[rspec-users] Cucumber ".should contain(expected) does but fails anyway

David Chelimsky dchelimsky at gmail.com
Wed Apr 22 11:12:05 EDT 2009


On Wed, Apr 22, 2009 at 10:02 AM, James Byrne <lists at ruby-forum.com> wrote:
>
> When I change the test to:
>
>  expected = '<title>Bank of Canada: Noon Foreign Exchange
> Rates</title>'
>  fx_doc.xpath('//rdf:RDF/xmlns:channel/xmlns:title').should =~ expected
>
> Then I see this instead:
>
>  expected: "<title>Bank of Canada: Noon Foreign Exchange
> Rates</title>",
>       got: <title>Bank of Canada: Noon Foreign Exchange Rates</title>
> (using =~)
>
> What is adding the double quotes?

Ruby. Try this in irb:

'this'
=> "this"

> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list