Skip to content

Commit

Permalink
stub the things
Browse files Browse the repository at this point in the history
  • Loading branch information
phamdt committed Mar 15, 2016
1 parent 2df9bfa commit cc07186
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions spec/controllers/user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ def generate_email
end

describe UsersController, type: :controller do
before(:all) do
Rails.application.config.ended = false
before do
allow(Rails.application.config).to receive(:ended) { false }
end

describe 'new' do
Expand Down
8 changes: 2 additions & 6 deletions spec/integration/user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@

describe "users", type: :request do
describe 'campaign ended' do
before(:each) do
Rails.application.config.ended = true
end

after(:each) do
Rails.application.config.ended = false
before do
allow(Rails.application.config).to receive(:ended) { true }
end

it 'should display campaign ended message when campaign has ended' do
Expand Down

0 comments on commit cc07186

Please sign in to comment.