Permalink
Browse files

Woops! Needed to test the rake task. Fixed

  • Loading branch information...
1 parent ac090a6 commit 8dd804b86ef9cf6cb50a97a37b96b8ed0255898f @elight committed Dec 4, 2009
Showing with 5 additions and 7 deletions.
  1. +0 −1 Rakefile
  2. +1 −0 lib/coulda.rb
  3. +0 −2 lib/coulda/feature.rb
  4. +2 −2 lib/coulda/tasks/print_features.rake
  5. +2 −2 lib/coulda/world.rb
View
@@ -24,7 +24,6 @@ begin
require 'jeweler'
Jeweler::Tasks.new do |s|
s.name = "coulda"
- s.version = "0.1.1"
s.authors = ["Evan David Light"]
s.email = "evan@tiggerpalace.com"
s.summary = "Behaviour Driven Development derived from Cucumber but as an internal DSL with methods for reuse"
View
@@ -18,6 +18,7 @@ def Feature(name, opts = {}, &block)
Coulda::assign_class_to_const test_class, name
test_class.class_eval &block if block_given?
test_class.assert_presence_of_intent
+ World.register_feature(test_class, name)
test_class
end
end
@@ -16,8 +16,6 @@ def self.current_scenario
@current_scenario
end
- World.register_feature(self)
-
%w[in_order_to as_a i_want_to].each do |intent|
eval <<-HERE
# An intent specifier
@@ -14,8 +14,8 @@ namespace :coulda do
load file
end
- Coulda::World.features.each do |feature|
- puts "Feature: #{feature.name}"
+ Coulda::World.features.each do |feature, name|
+ puts "Feature: #{name}"
puts " In order to #{feature.in_order_to}" if feature.in_order_to
puts " As a #{feature.as_a}" if feature.as_a
puts " I want to #{feature.i_want_to}" if feature.i_want_to
View
@@ -1,7 +1,7 @@
module Coulda
class World
- def self.register_feature(feature)
- (@features ||= []) << feature
+ def self.register_feature(feature, name)
+ (@features ||= []) << [feature, name]
end
def self.features

0 comments on commit 8dd804b

Please sign in to comment.