Extract redirect logic to an object or helper and test that.
UrlRewriter.new.rewrite('/foods/search/almonds').should == '/almonds'
helper.rewrite_url('/foods/search/almonds').should == '/almonds'
and then you will see that this should probably be called higher up in the call
stack, in a before_f
I require webrat in spec_helper (Spork.prefork).
versions:
rails 2.1.2
rspec 1.3.0
rspec-rails 1.3.2
ruby 1.8.7
The file is located at 'spec/integration/landing_page/
Ianding_page_spec.rb'. I am running 'spec spec/integration/
landing_page/landing_page_spec.rb'
I am also using the rspec-integra
On Sun, Feb 21, 2010 at 5:25 PM, drewB wrote:
> Whenever I use a matcher like response.should have_text in an
> integration test I receive the following error:
>
> undefined method `has' for # 0x7fe07d184038>
>
> Any idea why that is and how to fix it?
What versions of rails, rspec, and ruby are
On Sun, Feb 21, 2010 at 9:25 PM, drewB wrote:
> Whenever I use a matcher like response.should have_text in an
> integration test I receive the following error:
>
> undefined method `has' for # 0x7fe07d184038>
>
> Any idea why that is and how to fix it?
I think—not sure—those matchers are provided
Whenever I use a matcher like response.should have_text in an
integration test I receive the following error:
undefined method `has' for #
Any idea why that is and how to fix it?
Thanks!
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rub
Thanks David. I was able to key of some of what you said in the
blog. The solution for me was to add the following to my .autotest:
Autotest.add_hook :initialize do |at|
at.add_mapping(%r%^spec/(integration)/.*rb$%) { |filename, _|
filename
}
end
On Feb 19, 6:26 p
On Sun, Feb 21, 2010 at 2:57 PM, Marcus Ahnve wrote:
> Hi,
>
> I have a problem running the spec command in Rspec 1.3.0 with a
> directory as parameter.
>
> A spec for a MongoMapper document that works when run directly such as
>
> $ spec spec/model/attendant_spec.rb
>
> works fine. But the very s
Hi,
I have a problem running the spec command in Rspec 1.3.0 with a
directory as parameter.
A spec for a MongoMapper document that works when run directly such as
$ spec spec/model/attendant_spec.rb
works fine. But the very same spec run glob-style:
$ spec spec
fails with MongoMapper validati
On 19 February 2010 08:59, Erik Pukinskis wrote:
> Hello Specmeisters!
>
> I have a bit of a philosophical question for the TDD witches and
> wizards out there. I'm working on some code that is really
> churning... It's doing complicated calculations, but the actual
> desired results are a movin
On 31 January 2010 22:02, Nick Hoffman wrote:
> One of my controller actions sends a redirect if the request URI begins
> with /foods/search
>
> 34 def search
> 35return redirect_to "/#{params[:name]}" if
> request.request_uri.match /^\/foods\/search/
>
> Unfortunately, I can't figure out
10 matches
Mail list logo