Module: Simulacrum::Methods
- Defined in:
- lib/simulacrum/methods.rb
Overview
Rspec utility methods for defining components, browser environments and
Instance Method Summary collapse
Instance Method Details
#component(name) {|options| ... } ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/simulacrum/methods.rb', line 8 def component(name, &block) = OpenStruct.new yield component = Simulacrum::Component.new(name, ) Simulacrum.components[name] = component subject do component end end |
#configure_browser(name) {|options| ... } ⇒ Object
19 20 21 22 23 |
# File 'lib/simulacrum/methods.rb', line 19 def configure_browser(name, &block) = OpenStruct.new yield @browser = Simulacrum::Browser.new(name, ) end |