Permalink
Browse files

version bump to 3.4.1. added rake test:cells.

  • Loading branch information...
1 parent a781842 commit 3de5aa7cbce755fe4a3521a4629b4226606ef872 @apotonick apotonick committed Oct 4, 2010
Showing with 31 additions and 26 deletions.
  1. +4 −0 README.rdoc
  2. +6 −7 cells.gemspec
  3. +5 −1 lib/cells.rb
  4. +1 −1 lib/cells/version.rb
  5. +6 −14 lib/generators/cells/USAGE
  6. +3 −3 lib/generators/cells/templates/cell_test.rb
  7. +6 −0 lib/tasks.rake
View
@@ -123,6 +123,10 @@ So what if you wanna test the cart cell? Use the generated <tt>test/cells/shoppi
assert_select "#cart", "You have 3 items in your shopping cart."
end
+Run your tests with
+
+ $ rake test:cells
+
That's easy, clean and strongly improves your component-driven software quality. How'd you do that with partials?
View
@@ -5,11 +5,11 @@
Gem::Specification.new do |s|
s.name = %q{cells}
- s.version = "3.4.0"
+ s.version = "3.4.1"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Nick Sutterer"]
- s.date = %q{2010-09-29}
+ s.date = %q{2010-10-04}
s.description = %q{Cells are lightweight controllers for Rails and can be rendered in views, providing an elegant and fast way for encapsulation and component-orientation.}
s.email = %q{apotonick@gmail.com}
s.extra_rdoc_files = [
@@ -24,11 +24,10 @@ Gem::Specification.new do |s|
"Rakefile",
"lib/cell.rb",
"lib/cell/active_helper.rb",
- "lib/cell/base.rb",
"lib/cell/caching.rb",
"lib/cell/rails.rb",
+ "lib/cell/test_case.rb",
"lib/cells.rb",
- "lib/cells/assertions_helper.rb",
"lib/cells/helpers.rb",
"lib/cells/helpers/capture_helper.rb",
"lib/cells/rails.rb",
@@ -38,7 +37,8 @@ Gem::Specification.new do |s|
"lib/generators/cells/templates/cell.rb",
"lib/generators/cells/templates/cell_test.rb",
"lib/generators/cells/templates/view.erb",
- "lib/generators/cells/templates/view.haml"
+ "lib/generators/cells/templates/view.haml",
+ "lib/tasks.rake"
]
s.homepage = %q{http://cells.rubyforge.org}
s.rdoc_options = ["--charset=UTF-8"]
@@ -47,7 +47,6 @@ Gem::Specification.new do |s|
s.summary = %q{View Components for Rails.}
s.test_files = [
"test/active_helper_test.rb",
- "test/assertions_helper_test.rb",
"test/rails/router_test.rb",
"test/rails/view_test.rb",
"test/rails/capture_test.rb",
@@ -57,7 +56,6 @@ Gem::Specification.new do |s|
"test/rails/caching_test.rb",
"test/cell_generator_test.rb",
"test/test_helper.rb",
- "test/support/internal_assertions_helper.rb",
"test/dummy/config/application.rb",
"test/dummy/config/initializers/session_store.rb",
"test/dummy/config/initializers/mime_types.rb",
@@ -75,6 +73,7 @@ Gem::Specification.new do |s|
"test/dummy/app/controllers/musician_controller.rb",
"test/dummy/app/controllers/application_controller.rb",
"test/dummy/app/helpers/application_helper.rb",
+ "test/test_case_test.rb",
"test/helper_test.rb",
"test/cell_module_test.rb",
"test/app/cells/bassist_cell.rb",
View
@@ -63,7 +63,7 @@
require 'cell'
require 'cells/rails'
require 'cell/rails'
-
+require 'cell/test_case' if Rails.env == "test"
module Cells
# Any config should be placed here using +mattr_accessor+.
@@ -122,4 +122,8 @@ class Cells::Railtie < Rails::Railtie
#ActiveSupport::Dependencies.load_paths << Rails.root.join(*%w[app cells])
### DISCUSS: how are cell classes found by Rails?
end
+
+ rake_tasks do
+ load "tasks.rake"
+ end
end
View
@@ -1,3 +1,3 @@
module Cells
- VERSION = '3.4.0'
+ VERSION = '3.4.1'
end
View
@@ -7,20 +7,12 @@ Description:
Examples:
- ./script/generate cell Announcements index
+ rails g cells:cell ShoppingCart index --haml
- This will create an Announcements cell:
+ This will create these cell assets:
Cell:
- app/cells/announcements_cell.rb
+ app/cells/shopping_cart_cell.rb
Views:
- app/cells/announcements/index.html.erb
-
-
- ./script/generate cell Articles popular recent --haml
-
- This will create an Articles cell:
- Cell:
- app/cells/articles_cell.rb
- Views:
- app/cells/articles/popular.html.haml
- app/cells/articles/recent.html.haml
+ app/cells/shopping_cart/index.html.haml
+ Test:
+ test/cells/shopping_cart_cell_test
@@ -1,11 +1,11 @@
require 'test_helper'
class <%= class_name %>CellTest < Cell::TestCase
- <% for state in @states -%>
+<% for state in @states -%>
test "<%= state %>" do
- invoke <%= state %>
+ invoke :<%= state %>
assert_select "p"
end
- <% end %>
+<% end %>
end
View
@@ -0,0 +1,6 @@
+namespace "test" do
+ TestTaskWithoutDescription.new(:cells => "test:prepare") do |t|
+ t.libs << "test"
+ t.pattern = 'test/cells/**/*_test.rb'
+ end
+end

0 comments on commit 3de5aa7

Please sign in to comment.