Skip to content

Commit

Permalink
Replace deprecated RSpec syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatack committed Apr 10, 2015
1 parent 63d4973 commit ba92a0b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec/ransack/nodes/grouping_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,37 +15,37 @@ module Nodes
describe '#attribute_method?' do
context 'for attributes of the context' do
it 'is true' do
expect(subject.attribute_method?('name')).to be_true
expect(subject.attribute_method?('name')).to be true
end

context "when the attribute contains '_and_'" do
it 'is true' do
expect(subject.attribute_method?('terms_and_conditions')).to be_true
expect(subject.attribute_method?('terms_and_conditions')).to be true
end
end

context "when the attribute contains '_or_'" do
it 'is true' do
expect(subject.attribute_method?('true_or_false')).to be_true
expect(subject.attribute_method?('true_or_false')).to be true
end
end

context "when the attribute ends with '_start'" do
it 'is true' do
expect(subject.attribute_method?('life_start')).to be_true
expect(subject.attribute_method?('life_start')).to be true
end
end

context "when the attribute ends with '_end'" do
it 'is true' do
expect(subject.attribute_method?('stop_end')).to be_true
expect(subject.attribute_method?('stop_end')).to be true
end
end
end

context 'for unknown attributes' do
it 'is false' do
expect(subject.attribute_method?('not_an_attribute')).to be_false
expect(subject.attribute_method?('not_an_attribute')).to be false
end
end
end
Expand Down

0 comments on commit ba92a0b

Please sign in to comment.