Closed cimm closed 13 years ago
The rspec2-rails-views-matchers expect a string and that won't always be the case. Take the following example where I want to show a simple integer:
rspec2-rails-views-matchers
it "shows the price of the item" do price = 100 render rendered.should have_tag("#price", :text => price) end
Returns the following error:
Failure/Error: rendered.should have_tag(".total_amount", :text => price) NoMethodError: undefined method `gsub' for 100:Fixnum
It does work fine when I use a string like price = "100". This makes it impossible to use integers (or mocks or any other object) with the gem.
price = "100"
fixed in 0.2.1 thanks for pointing me to this!
Thanks again Dmitry! I tried it out with some mocks in my view tests and it works. Amazed by your fast bug fixing skills! :)
The
rspec2-rails-views-matchers
expect a string and that won't always be the case. Take the following example where I want to show a simple integer:Returns the following error:
It does work fine when I use a string like
price = "100"
. This makes it impossible to use integers (or mocks or any other object) with the gem.