Created
April 4, 2012 03:53
-
-
Save jdickey/2297604 to your computer and use it in GitHub Desktop.
Output from 'rake spec' using a newly-generated Cell; matcher syntax apparently has changed since Cells originally written
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This Gist contains 4 files of interest: | |
- 01. Shell output from running rake spec with as-generated spec | |
- 02. As-generated articles_cell_spec.rb | |
- 03. My reworked articles_cell_spec.rb | |
- 04. Gemfile for the project | |
Posted in support of issue #117 on apotonick/cells project. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/local/bin/ruby -S rspec ./spec/cells/articles_cell_spec.rb ./spec/controllers/meldd_controller_spec.rb ./spec/helpers/meldd_helper_spec.rb ./spec/models/article_spec.rb ./spec/models/meldd_spec.rb ./spec/views/layouts/application.html.haml_spec.rb ./spec/views/meldd/index.html.haml_spec.rb | |
ArticlesCell | |
cell rendering | |
rendering top | |
should When you call a matcher in an example without a String, like this: | |
specify { object.should matcher } | |
or this: | |
it { should matcher } | |
RSpec expects the matcher to have a #description method. You should either | |
add a String to the example this matcher is being used in, or give it a | |
description method. Then you won't have to suffer this lengthy warning again. | |
should When you call a matcher in an example without a String, like this: | |
specify { object.should matcher } | |
or this: | |
it { should matcher } | |
RSpec expects the matcher to have a #description method. You should either | |
add a String to the example this matcher is being used in, or give it a | |
description method. Then you won't have to suffer this lengthy warning again. | |
rendering new | |
should When you call a matcher in an example without a String, like this: | |
specify { object.should matcher } | |
or this: | |
it { should matcher } | |
RSpec expects the matcher to have a #description method. You should either | |
add a String to the example this matcher is being used in, or give it a | |
description method. Then you won't have to suffer this lengthy warning again. | |
should When you call a matcher in an example without a String, like this: | |
specify { object.should matcher } | |
or this: | |
it { should matcher } | |
RSpec expects the matcher to have a #description method. You should either | |
add a String to the example this matcher is being used in, or give it a | |
description method. Then you won't have to suffer this lengthy warning again. | |
cell instance | |
should respond to #top | |
should respond to #new | |
MelddController | |
GET 'index' | |
returns http success | |
MelddHelper | |
add some examples to (or delete) /Users/jeffdickey/src/rails/dojo_poc/spec/helpers/meldd_helper_spec.rb (PENDING: No reason given) | |
Article | |
starts with blank attributes | |
Meldd | |
has no entries when created | |
#new_article | |
returns a new article | |
must have an ID higher than the previously-existing article count | |
sets the new article's Meldd reference to itself | |
#add_entry | |
adds the entry to the meldd | |
layouts/application | |
it renders the HTML page header, including the | |
expected META tags | |
page title | |
stylesheet links | |
JavaScript links | |
it renders the HTML page body, including the | |
BODY element itself | |
navbar fixed to the top of the page, with expected content | |
meldd/index | |
renders the banner area properly, with trailing clearfix | |
Pending: | |
MelddHelper add some examples to (or delete) /Users/jeffdickey/src/rails/dojo_poc/spec/helpers/meldd_helper_spec.rb | |
# No reason given | |
# ./spec/helpers/meldd_helper_spec.rb:14 | |
Finished in 0.13818 seconds | |
21 examples, 0 failures, 1 pending | |
Coverage report generated for RSpec to /Users/jeffdickey/src/rails/dojo_poc/coverage. 38 / 38 LOC (100.0%) covered. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/local/bin/ruby -S rspec ./spec/cells/articles_cell_spec.rb ./spec/controllers/meldd_controller_spec.rb ./spec/helpers/meldd_helper_spec.rb ./spec/models/article_spec.rb ./spec/models/meldd_spec.rb ./spec/views/layouts/application.html.haml_spec.rb ./spec/views/meldd/index.html.haml_spec.rb | |
ArticlesCell | |
cell rendering | |
rendering top | |
should When you call a matcher in an example without a String, like this: | |
specify { object.should matcher } | |
or this: | |
it { should matcher } | |
RSpec expects the matcher to have a #description method. You should either | |
add a String to the example this matcher is being used in, or give it a | |
description method. Then you won't have to suffer this lengthy warning again. | |
should When you call a matcher in an example without a String, like this: | |
specify { object.should matcher } | |
or this: | |
it { should matcher } | |
RSpec expects the matcher to have a #description method. You should either | |
add a String to the example this matcher is being used in, or give it a | |
description method. Then you won't have to suffer this lengthy warning again. | |
rendering new | |
should When you call a matcher in an example without a String, like this: | |
specify { object.should matcher } | |
or this: | |
it { should matcher } | |
RSpec expects the matcher to have a #description method. You should either | |
add a String to the example this matcher is being used in, or give it a | |
description method. Then you won't have to suffer this lengthy warning again. | |
should When you call a matcher in an example without a String, like this: | |
specify { object.should matcher } | |
or this: | |
it { should matcher } | |
RSpec expects the matcher to have a #description method. You should either | |
add a String to the example this matcher is being used in, or give it a | |
description method. Then you won't have to suffer this lengthy warning again. | |
cell instance | |
should respond to #top | |
should respond to #new | |
MelddController | |
GET 'index' | |
returns http success | |
MelddHelper | |
add some examples to (or delete) /Users/jeffdickey/src/rails/dojo_poc/spec/helpers/meldd_helper_spec.rb (PENDING: No reason given) | |
Article | |
starts with blank attributes | |
Meldd | |
has no entries when created | |
#new_article | |
returns a new article | |
must have an ID higher than the previously-existing article count | |
sets the new article's Meldd reference to itself | |
#add_entry | |
adds the entry to the meldd | |
layouts/application | |
it renders the HTML page header, including the | |
expected META tags | |
page title | |
stylesheet links | |
JavaScript links | |
it renders the HTML page body, including the | |
BODY element itself | |
navbar fixed to the top of the page, with expected content | |
meldd/index | |
renders the banner area properly, with trailing clearfix | |
Pending: | |
MelddHelper add some examples to (or delete) /Users/jeffdickey/src/rails/dojo_poc/spec/helpers/meldd_helper_spec.rb | |
# No reason given | |
# ./spec/helpers/meldd_helper_spec.rb:14 | |
Finished in 0.13818 seconds | |
21 examples, 0 failures, 1 pending | |
Coverage report generated for RSpec to /Users/jeffdickey/src/rails/dojo_poc/coverage. 38 / 38 LOC (100.0%) covered. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/local/bin/ruby -S rspec ./spec/cells/articles_cell_spec.rb ./spec/controllers/meldd_controller_spec.rb ./spec/helpers/meldd_helper_spec.rb ./spec/models/article_spec.rb ./spec/models/meldd_spec.rb ./spec/views/layouts/application.html.haml_spec.rb ./spec/views/meldd/index.html.haml_spec.rb | |
ArticlesCell | |
cell rendering | |
rendering top | |
should When you call a matcher in an example without a String, like this: | |
specify { object.should matcher } | |
or this: | |
it { should matcher } | |
RSpec expects the matcher to have a #description method. You should either | |
add a String to the example this matcher is being used in, or give it a | |
description method. Then you won't have to suffer this lengthy warning again. | |
should When you call a matcher in an example without a String, like this: | |
specify { object.should matcher } | |
or this: | |
it { should matcher } | |
RSpec expects the matcher to have a #description method. You should either | |
add a String to the example this matcher is being used in, or give it a | |
description method. Then you won't have to suffer this lengthy warning again. | |
rendering new | |
should When you call a matcher in an example without a String, like this: | |
specify { object.should matcher } | |
or this: | |
it { should matcher } | |
RSpec expects the matcher to have a #description method. You should either | |
add a String to the example this matcher is being used in, or give it a | |
description method. Then you won't have to suffer this lengthy warning again. | |
should When you call a matcher in an example without a String, like this: | |
specify { object.should matcher } | |
or this: | |
it { should matcher } | |
RSpec expects the matcher to have a #description method. You should either | |
add a String to the example this matcher is being used in, or give it a | |
description method. Then you won't have to suffer this lengthy warning again. | |
cell instance | |
should respond to #top | |
should respond to #new | |
MelddController | |
GET 'index' | |
returns http success | |
MelddHelper | |
add some examples to (or delete) /Users/jeffdickey/src/rails/dojo_poc/spec/helpers/meldd_helper_spec.rb (PENDING: No reason given) | |
Article | |
starts with blank attributes | |
Meldd | |
has no entries when created | |
#new_article | |
returns a new article | |
must have an ID higher than the previously-existing article count | |
sets the new article's Meldd reference to itself | |
#add_entry | |
adds the entry to the meldd | |
layouts/application | |
it renders the HTML page header, including the | |
expected META tags | |
page title | |
stylesheet links | |
JavaScript links | |
it renders the HTML page body, including the | |
BODY element itself | |
navbar fixed to the top of the page, with expected content | |
meldd/index | |
renders the banner area properly, with trailing clearfix | |
Pending: | |
MelddHelper add some examples to (or delete) /Users/jeffdickey/src/rails/dojo_poc/spec/helpers/meldd_helper_spec.rb | |
# No reason given | |
# ./spec/helpers/meldd_helper_spec.rb:14 | |
Finished in 0.13818 seconds | |
21 examples, 0 failures, 1 pending | |
Coverage report generated for RSpec to /Users/jeffdickey/src/rails/dojo_poc/coverage. 38 / 38 LOC (100.0%) covered. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe ArticlesCell do | |
context "cell rendering" do | |
context "rendering top" do | |
subject { render_cell(:articles, :top) } | |
it { should have_selector("h1", :content => "Articles#top") } | |
it { should have_selector("p", :content => "Find me in app/cells/articles/top.html") } | |
end | |
context "rendering new" do | |
subject { render_cell(:articles, :new) } | |
it { should have_selector("h1", :content => "Articles#new") } | |
it { should have_selector("p", :content => "Find me in app/cells/articles/new.html") } | |
end | |
end | |
context "cell instance" do | |
subject { cell(:articles) } | |
it { should respond_to(:top) } | |
it { should respond_to(:new) } | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe ArticlesCell do | |
context "cell rendering" do | |
context "rendering top" do | |
subject { render_cell(:articles, :top) } | |
it "should contain a top-level header element" do | |
subject.should have_selector "h1", :content => "Articles#top" | |
end | |
it "should contain a paragraph block element" do | |
subject.should have_selector "p", :content => "Find me in app/cells/articles/top.html" | |
end | |
end | |
context "rendering new" do | |
subject { render_cell(:articles, :new) } | |
it "should contain a top-level header element" do | |
subject.should have_selector "h1", :content => "Articles#new" | |
end | |
it "should contain a paragraph block element" do | |
subject.should have_selector "p", :content => "Find me in app/cells/articles/new.html" | |
end | |
end | |
end | |
context "cell instance" do | |
subject { cell(:articles) } | |
it { should respond_to(:top) } | |
it { should respond_to(:new) } | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'rails', '3.2.2' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'sqlite3' | |
gem 'sentient_user' | |
gem 'timecop' | |
gem 'cells' | |
gem 'rspec-cells' | |
gem 'haml' | |
gem 'haml-rails' | |
gem 'dsl' | |
gem 'compass' | |
gem 'simple_enum' | |
gem 'simple_form' | |
gem 'sass-rails' | |
gem 'bootstrap-sass' | |
# Gems used only for assets and not required | |
# in production environments by default. | |
group :assets do | |
# gem 'sass-rails-bootstrap' | |
gem 'twitter_bootstrap_form_for' | |
gem 'coffee-rails' | |
gem 'compass-rails' | |
# See https://github.com/sstephenson/execjs#readme for more supported runtimes | |
gem 'therubyracer' | |
gem 'execjs' | |
gem 'uglifier', '>= 1.0.3' | |
end | |
# gem 'jquery-rails' | |
# To use ActiveModel has_secure_password | |
# gem 'bcrypt-ruby', '~> 3.0.0' | |
# To use Jbuilder templates for JSON | |
# gem 'jbuilder' | |
# Use unicorn as the app server | |
# gem 'unicorn' | |
# Deploy with Capistrano | |
# gem 'capistrano' | |
# To use debugger | |
# gem 'ruby-debug19', :require => 'ruby-debug' | |
group :development, :test do | |
gem 'awesome_print' | |
gem 'bundle_outdated' | |
gem 'fuubar' | |
gem 'pry' | |
# gem 'pry-doc' | |
gem 'pry-nav' | |
gem 'pry-remote' | |
gem 'pry-rails' | |
gem 'pry-stack_explorer' | |
gem 'pry-exception_explorer' | |
gem 'rspec-rails' | |
gem 'rspec-html-matchers' | |
gem 'simplecov' | |
gem 'webrat' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment