Fixing some tests that weren't testing correctly

These assertions were always returning true even if you dont populate
the flash, because nil.should_not be_empty returns true
This commit is contained in:
Gonzalo Rodriguez 2011-08-19 23:57:33 -03:00
parent a74080e27d
commit 234af2a15b
4 changed files with 4 additions and 4 deletions

View file

@ -59,7 +59,7 @@ describe AspectMembershipsController do
:format => 'js',
:person_id => @person.id,
:aspect_id => @aspect0.id
flash[:error].should_not be_empty
flash[:error].should_not be_blank
end
it 'does not 500 on a duplicate key error' do

View file

@ -162,7 +162,7 @@ describe InvitationsController do
it 'displays a message that tells the user how many invites were sent, and which REJECTED' do
post :create, :user => @invite.merge(
:email => "mbs@gmail.com, foo@bar.com, foo.com, lala@foo, cool@bar.com")
flash[:notice].should_not be_empty
flash[:notice].should_not be_blank
flash[:notice].should =~ /foo\.com/
flash[:notice].should =~ /lala@foo/
end

View file

@ -39,7 +39,7 @@ describe ProfilesController do
:first_name => "Will",
:last_name => "Smith"
}
flash[:notice].should_not be_empty
flash[:notice].should_not be_blank
end
it 'sets tags' do

View file

@ -61,7 +61,7 @@ describe RegistrationsController do
it "sets the flash" do
get :create, @valid_params
flash[:notice].should_not be_empty
flash[:notice].should_not be_blank
end
it "redirects to the home path" do