Displaying 4 results from an estimated 4 matches for "should_match".
2006 Sep 06
1
support for arbitrary comparisons
Mike Williams contributed a patch to support arbitrary comparisons.
This is now in the trunk and will be part of the next release. So you
will now be able to do this:
result.should_be < 5
result.should_be >= 7
It also supports alternate syntax for should_be, should_match
result.should == 3
result.should =~ /regex/
Personally, I prefer should_be and should_match in these cases, as I
think they read better. Anyone else have opinions about that?
This patch also supports using methods that are not formatted like
predicates but act like them:
def whatever
true
end...
2007 Feb 01
3
should_redirect_to in rspec-0.8.0 / rspec_on_rails 1453
...;joeschmoe'', :email =>
''joe at shmoe.com'', :email_confirmation => ''joe at shmoe.com'', :full_name
=> ''Joe Schmoe''}
assigns[:user].should_not_be_nil
assigns[:user].new_record?.should_not_be(true)
flash[:notice].should_match(/user added/)
response.should_be_redirect
puts "redirecting to #{response.redirect_url}"
puts "this response was #{response.redirect?}"
controller.should_redirect_to ''http://test.host/user''
end
the puts statements output the following:...
2007 Jul 26
5
Coding standards and whitespace
...d_equal.tmSnippet
RSpec.tmbundle/Snippets/should_have.tmSnippet
RSpec.tmbundle/Snippets/should_have_at_least.tmSnippet
RSpec.tmbundle/Snippets/should_have_at_most.tmSnippet
RSpec.tmbundle/Snippets/should_have_records.tmSnippet
RSpec.tmbundle/Snippets/should_include.tmSnippet
RSpec.tmbundle/Snippets/should_match.tmSnippet
RSpec.tmbundle/Snippets/should_not ==.tmSnippet
RSpec.tmbundle/Snippets/should_not =~.tmSnippet
RSpec.tmbundle/Snippets/should_not eql.tmSnippet
RSpec.tmbundle/Snippets/should_not_be.tmSnippet
RSpec.tmbundle/Snippets/should_not_be_a_kind_of.tmSnippet
RSpec.tmbundle/Snippets/should_not_be_...
2007 Feb 04
10
Spec''ing ActionMailer
Good morning (Pacific Time). I have a controller action that, as a
side-effect, sends an email to an administrator. I want it to do
something like this:
specify "when someone successfully signs up, an email should be sent
to the administrator with the person''s contact page" do
post :signup, {...lots o'' params}
response should_be success
#