Skip to content

Commit

Permalink
Updated to use yourdsl
Browse files Browse the repository at this point in the history
Fixed a test issue

version to 0.7.1
  • Loading branch information
Evan Light committed Aug 8, 2011
1 parent cfde078 commit d1a9ca5
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 22 deletions.
1 change: 1 addition & 0 deletions Gemfile
Expand Up @@ -2,3 +2,4 @@ source "http://rubygems.org"

gem 'shoulda'
gem 'rr'
gem 'yourdsl', '~> 0.7'
2 changes: 2 additions & 0 deletions Gemfile.lock
Expand Up @@ -3,10 +3,12 @@ GEM
specs:
rr (1.0.2)
shoulda (2.11.3)
yourdsl (0.7.1)

PLATFORMS
ruby

DEPENDENCIES
rr
shoulda
yourdsl (~> 0.7)
8 changes: 4 additions & 4 deletions coulda.gemspec
Expand Up @@ -5,13 +5,13 @@

Gem::Specification.new do |s|
s.name = %q{coulda}
s.version = "0.7.0"
s.version = "0.7.1"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Evan David Light"]
s.date = %q{2011-05-19}
s.date = %q{2011-08-08}
s.description = %q{Behaviour Driven Development derived from Cucumber but as an internal DSL with methods for reuse}
s.email = %q{evan@tiggerpalace.com}
s.email = %q{evan@tripledogdare.net}
s.extra_rdoc_files = [
"LICENSE",
"README.rdoc"
Expand All @@ -24,7 +24,7 @@ Gem::Specification.new do |s|
s.summary = %q{Test::Unit-based acceptance testing DSL}
s.test_files = Dir.glob('test/**')

s.add_dependency('lispy', '>= 0.1.2')
s.add_dependency('yourdsl', '~> 0.7')

if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
Expand Down
8 changes: 4 additions & 4 deletions lib/coulda.rb
@@ -1,5 +1,5 @@
require 'test/unit'
require 'lispy'
require 'yourdsl'

require File.join(File.dirname(__FILE__), 'coulda', 'world')
require File.join(File.dirname(__FILE__), 'coulda', 'pending')
Expand All @@ -19,10 +19,10 @@ def Feature(name, opts = {}, &block)

assign_class_to_const test_class, name
test_class.instance_eval do
extend Lispy
acts_lispy :only => Coulda::KEYWORDS, :retain_blocks_for => Coulda::PROC_KEYWORDS
extend YourDSL
record_your_dsl :only => Coulda::KEYWORDS, :retain_blocks_for => Coulda::PROC_KEYWORDS
end
test_class.class_eval &block if block_given?
test_class.instance_eval &block if block_given?

World.register_feature(name, test_class.output)

Expand Down
17 changes: 3 additions & 14 deletions test/integration/using_coulda_test.rb
Expand Up @@ -9,11 +9,7 @@
as_a "developer"
i_want_to "have typical Coulda usage work"

def self.some_method; end

def prove_methods_from_then_invokes_method_on_feature
assert true
end
def given_something; end

Scenario "A pending scenario with a Given/When/Then without a block" do
Given "this scenario which should be pending" do
Expand All @@ -23,19 +19,12 @@ def prove_methods_from_then_invokes_method_on_feature
Then "should not error/fail because it is pending" do; end
end

Scenario "A scenario without a When" do
Given "a scenario calling a Feature instance method" do; end
Scenario "A live scenario with a call to a class method" do
given_something
Then "should pass if the method does not fail/error" do
prove_methods_from_then_invokes_method_on_feature
end
end

Scenario "that is live" do
Given "no prerequisites" do; end
When "no events" do; end
Then "should pass" do; end
end

Scenario "A scenario with a lot of Ands" do
Given "no prerequisites" do; end
And "some more lack of prerequisites" do; end
Expand Down

0 comments on commit d1a9ca5

Please sign in to comment.