Skip to content

Commit

Permalink
Woops! Needed to test the rake task. Fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
elight committed Dec 4, 2009
1 parent ac090a6 commit 8dd804b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
1 change: 0 additions & 1 deletion Rakefile
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions lib/coulda.rb
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions lib/coulda/feature.rb
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lib/coulda/tasks/print_features.rake
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lib/coulda/world.rb
@@ -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
Expand Down

0 comments on commit 8dd804b

Please sign in to comment.