Class: RSpec::Rails::CellExampleGroup::Content

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/cells/cell_example_group.rb

Overview

TODO: test if view model cell wrapping works (and normal dialect) test with both webrick and capybara

Instance Method Summary collapse

Constructor Details

#initialize(cell) ⇒ Content

Returns a new instance of Content.



47
48
49
# File 'lib/rspec/cells/cell_example_group.rb', line 47

def initialize(cell)
  @cell = cell
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(*args) ⇒ Object



51
52
53
54
55
56
# File 'lib/rspec/cells/cell_example_group.rb', line 51

def method_missing(*args)
  content = @cell.send(*args)

  return Capybara.string(content) if content.is_a?(String)
  content
end