1
0
Fork 0
mirror of https://github.com/paper-trail-gem/paper_trail.git synced 2022-11-09 11:33:19 -05:00

Skip current_user test in Ruby18 due to pesky :id method

This commit is contained in:
Ben Atkins 2014-03-20 16:54:57 -04:00
parent 618768853a
commit 0b2433667c

View file

@ -21,11 +21,13 @@ describe "Articles" do
let(:article) { Article.last }
context "`current_user` method returns a `String`" do
it "should set that value as the `whodunnit`" do
expect { post articles_path(valid_params) }.to change(PaperTrail::Version, :count).by(1)
article.title.should == 'Doh'
PaperTrail.whodunnit.should == 'foobar'
article.versions.last.whodunnit.should == 'foobar'
if RUBY_VERSION.to_f >= 1.9
it "should set that value as the `whodunnit`" do
expect { post articles_path(valid_params) }.to change(PaperTrail::Version, :count).by(1)
article.title.should == 'Doh'
PaperTrail.whodunnit.should == 'foobar'
article.versions.last.whodunnit.should == 'foobar'
end
end
end
end