Skip to content

Commit

Permalink
the attribute is set independent of the validations
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronLasseigne committed Feb 14, 2014
1 parent 4e6762c commit fbfd99a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec/active_interaction/base_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ def execute
end
let(:thing) { SecureRandom.hex }

before { inputs.merge!(thing: thing) }

it 'sets the attribute' do
expect(interaction.thing).to eq thing
end

context 'failing validations' do
before { inputs.merge!(thing: nil) }

Expand All @@ -73,15 +79,9 @@ def execute
end

context 'passing validations' do
before { inputs.merge!(thing: thing) }

it 'returns a valid outcome' do
expect(interaction).to be_valid
end

it 'sets the attribute' do
expect(interaction.thing).to eq thing
end
end
end

Expand Down

0 comments on commit fbfd99a

Please sign in to comment.