Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Woops! Needed to test the rake task. Fixed

  • Loading branch information...
commit 8dd804b86ef9cf6cb50a97a37b96b8ed0255898f 1 parent ac090a6
@elight authored
View
1  Rakefile
@@ -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
1  lib/coulda.rb
@@ -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
View
2  lib/coulda/feature.rb
@@ -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
View
4 lib/coulda/tasks/print_features.rake
@@ -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
4 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
Please sign in to comment.
Something went wrong with that request. Please try again.