Module: Museo::RSpecIntegration
- Includes:
- TestIntegration
- Defined in:
- lib/museo/rspec_integration.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Methods included from TestIntegration
#_add_snapshot_helper_methods, #_museo_setup, #_museo_teardown, #_redefine_render_with_snapshot_layout, #_remove_snapshot_helper_methods
Class Method Details
.included(base) ⇒ Object
5 6 7 8 |
# File 'lib/museo/rspec_integration.rb', line 5 def self.included(base) base.render_views base.extend(ClassMethods) end |
Instance Method Details
#expect_matching_snapshot(example) ⇒ Object
26 27 28 29 30 31 |
# File 'lib/museo/rspec_integration.rb', line 26 def expect_matching_snapshot(example) snapshot = Snapshot::Rspec.new(self, example.) response_body = Snapshot.sanitize_response(response.body) expect(response_body).to eq(snapshot.body), "Snapshot did not match" end |