Sha256: 3eb73fb8d7c20d22d41802f96afe9814d13b000ef1a45984e0923a428528774a
Contents?: true
Size: 812 Bytes
Versions: 1
Compression:
Stored size: 812 Bytes
Contents
PageModels::Base.send(:include, RSpec::Matchers) module PageModels module RSpecIntegration def open_page(page_model) page_model = page_model.new if page_model.is_a? Class $page_model = page_model $page_model.open! end def should_see_page(page_model) page_model = page_model.new if page_model.is_a? Class $page_model = page_model $page_model._verify! end end module PageModelMethodDelegation def method_missing(name, *args, &block) if $page_model && $page_model.respond_to?(name) $page_model.send(name, *args, &block) else super(name, *args, &block) end end end end Object.send(:include, PageModels::RSpecIntegration) RSpec.configure { |c| c.include PageModels::PageModelMethodDelegation }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pagemodels-0.2.1 | lib/page_models/integration/rspec.rb |