Skip to content

Commit

Permalink
Add a failing test case
Browse files Browse the repository at this point in the history
  • Loading branch information
jtibbertsma committed Dec 4, 2016
1 parent 71dc61a commit a06d5a7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spec/dummy/spec/helpers/react_on_rails_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -183,4 +183,16 @@
it { is_expected.to be_an_instance_of ActiveSupport::SafeBuffer }
it { is_expected.to eq hello_world }
end

describe "#rails_context" do
it "should not throw an error if not in a view" do
class PlainClass
include ReactOnRailsHelper
end

ob = PlainClass.new
expect { ob.send(:rails_context, server_side: true) }.to_not raise_error
expect { ob.send(:rails_context, server_side: false) }.to_not raise_error
end
end
end

0 comments on commit a06d5a7

Please sign in to comment.