I was really impressed by your presentation at Sapporo Ruby Kaigi,
and I've started to use Cells, It's awesome!
Anyway, This pull request is for:
Fixing up template
Use Capybara syntax if it were using
What do you think of it?
Belows are output example of $ rails g cell cart foo bar.
before:
require 'spec_helper'
describe CartCell do
context "cell rendering" do
context "rendering foo" do
subject { render_cell(:cart, :foo) }
it { should have_selector("h1", :content => "Cart#foo") }
it { should have_selector("p", :content => "Find me in app/cells/cart/foo.html") }
end
context "rendering bar" do
subject { render_cell(:cart, :bar) }
it { should have_selector("h1", :content => "Cart#bar") }
it { should have_selector("p", :content => "Find me in app/cells/cart/bar.html") }
end
end
context "cell instance" do
subject { cell(:cart) }
it { should respond_to(:foo) }
it { should respond_to(:bar) }
end
end
after:
require 'spec_helper'
describe CartCell do
context "cell instance" do
subject { cell(:cart) }
it { should respond_to(:foo) }
it { should respond_to(:bar) }
end
context "cell rendering" do
context "rendering foo" do
subject { render_cell(:cart, :foo) }
it { should have_selector("h1", :text => "Cart#foo") }
it { should have_selector("p", :text => "Find me in app/cells/cart/foo.html") }
end
context "rendering bar" do
subject { render_cell(:cart, :bar) }
it { should have_selector("h1", :text => "Cart#bar") }
it { should have_selector("p", :text => "Find me in app/cells/cart/bar.html") }
end
end
end
Hi @apotonick.
I was really impressed by your presentation at Sapporo Ruby Kaigi, and I've started to use Cells, It's awesome!
Anyway, This pull request is for:
What do you think of it? Belows are output example of
$ rails g cell cart foo bar
.before:
after: