diff --git a/Gemfile b/Gemfile index 5f322536..f023abf7 100644 --- a/Gemfile +++ b/Gemfile @@ -41,6 +41,7 @@ end group :test do gem "autotest" + gem "growl-glue" gem 'rspec-rails', '2.0.0.beta.19' gem 'factory_girl_rails' gem "pickle", :git => "http://github.com/codegram/pickle.git" diff --git a/Gemfile.lock b/Gemfile.lock index e29f01a8..0c4f1bf0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -127,6 +127,7 @@ GEM gherkin (2.1.5) trollop (~> 1.16.2) git (1.2.5) + growl-glue (1.0.7) haml (3.0.13) has_scope (0.5.0) heroku (1.9.13) @@ -259,6 +260,7 @@ DEPENDENCIES factory_girl_rails fastthread formtastic! + growl-glue haml (= 3.0.13) heroku httparty (= 0.6.1) diff --git a/spec/models/account_spec.rb b/spec/models/account_spec.rb index 49a87c6a..20abd909 100644 --- a/spec/models/account_spec.rb +++ b/spec/models/account_spec.rb @@ -61,34 +61,34 @@ describe Account do end end - + describe 'cross domain authentication' do - + before(:each) do @account = Factory.build(:account) @account.stubs(:save).returns(true) end - + it 'sets a token' do @account.reset_switch_site_token!.should be_true @account.switch_site_token.should_not be_empty end - + context 'retrieving an account' do - + it 'does not find it with an empty token' do Account.find_using_switch_site_token(nil).should be_nil end - + it 'raises an exception if not found' do lambda { Account.find_using_switch_site_token!(nil) }.should raise_error(Mongoid::Errors::DocumentNotFound) end - + end - - + + end end