Sha256: b25a19e9eb2246dee23568c0db39263827d2bcc22e3c9286140dc4e182956c51
Contents?: true
Size: 666 Bytes
Versions: 1
Compression:
Stored size: 666 Bytes
Contents
require 'spec_helper' class DummyCell < Cell::ViewModel def show "<p>I'm Dummy.</p>" end def update "Updating #{options[:what]}." end end class SongCell < Cell::ViewModel def show "#{model}!" end end describe "Cell::Testing in specs" do include RSpec::Cells::ExampleGroup describe "#cell" do it { expect(cell(:dummy).call).to eq("<p>I'm Dummy.</p>") } # with user options. it { expect(cell(:song, "Don't Have The Cow").call).to eq("Don't Have The Cow!") } end describe "Capybara matchers" do it { skip "please make Capybara run with the test suite"; expect(cell(:dummy).call).to have_selector("p") } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rspec-cells-0.3.0 | spec/cells/cell_spec_spec.rb |