Skip to content

Instantly share code, notes, and snippets.

@natritmeyer
Created August 27, 2011 11:22
Show Gist options
  • Save natritmeyer/1175269 to your computer and use it in GitHub Desktop.
Save natritmeyer/1175269 to your computer and use it in GitHub Desktop.
BDD example with WPF, cucumber, ironruby and bewildr; Part 2
C:\wpfbdd>irake spec
C:/ironruby/bin/ir.exe -S rspec spec/counter_spec.rb
No examples found.
Finished in 0.01001 seconds
0 examples, 0 failures
C:\wpfbdd>irake spec
C:/ironruby/bin/ir.exe -S rspec spec/counter_spec.rb
**
Pending:
Counter should start the count at zero
# Not Yet Implemented
# ./spec/counter_spec.rb:2
Counter should increase the count when incremented
# Not Yet Implemented
# ./spec/counter_spec.rb:3
Finished in 0.06009 seconds
2 examples, 0 failures, 2 pending
C:\wpfbdd>irake spec
C:/ironruby/bin/ir.exe -S rspec spec/counter_spec.rb
C:/ironruby/Lib/ruby/1.9.1/rubygems/custom_require.rb:28:in `require': no such file to load -- C:/wpfbdd/SheepCounter/Counter/bin/Debug/Counter.dll (LoadError)
from C:/ironruby/Lib/ruby/1.9.1/rubygems/custom_require.rb:28:in `require'
from C:/wpfbdd/spec/counter_spec.rb:1
from [snip]
rake aborted!
ruby -S rspec spec/counter_spec.rb failed
C:\wpfbdd>irake spec
C:/ironruby/bin/ir.exe -S rspec spec/counter_spec.rb
F*
Pending:
Counter should increase the count when incremented
# Not Yet Implemented
# ./spec/counter_spec.rb:14
Failures:
1) Counter should start the count at zero
Failure/Error: @counter.count.should == 0
NoMethodError:
undefined method `count' for Counter.Counter:Counter::Counter
# ./spec/counter_spec.rb:11
Finished in 0.10014 seconds
2 examples, 1 failure, 1 pending
Failed examples:
rspec ./spec/counter_spec.rb:10 # Counter should start the count at zero
rake aborted!
ruby -S rspec spec/counter_spec.rb failed
C:\wpfbdd>irake spec
C:/ironruby/bin/ir.exe -S rspec spec/counter_spec.rb
.*
Pending:
Counter should increase the count when incremented
# Not Yet Implemented
# ./spec/counter_spec.rb:12
Finished in 0.12017 seconds
2 examples, 0 failures, 1 pending
C:\wpfbdd>irake spec
C:/ironruby/bin/ir.exe -S rspec spec/counter_spec.rb
.F
Failures:
1) Counter should increase the count when incremented
Failure/Error: @counter.increment
NoMethodError:
undefined method `increment' for Counter.Counter:Counter::Counter
# ./spec/counter_spec.rb:13
Finished in 0.19027 seconds
2 examples, 1 failure
Failed examples:
rspec ./spec/counter_spec.rb:12 # Counter should increase the count when incremented
rake aborted!
ruby -S rspec spec/counter_spec.rb failed
namespace Counter
{
public class Counter
{
private int currentCount;
public Counter()
{
currentCount = 0;
}
public int count()
{
return currentCount;
}
}
}
describe "Counter" do
it "should start the count at zero"
it "should increase the count when incremented"
end
require File.join(Dir.pwd, 'SheepCounter', 'Counter', 'bin', 'Debug', 'Counter.dll')
describe "Counter" do
before(:each) do
@counter = Counter::Counter.new
end
it "should start the count at zero" do
@counter.count.should == 0
end
it "should increase the count when incremented"
end
require File.join(Dir.pwd, 'SheepCounter', 'Counter', 'bin', 'Debug', 'Counter.dll')
describe "Counter" do
before(:each) do
@counter = Counter::Counter.new
end
it "should start the count at zero" do
@counter.count.should == 0
end
it "should increase the count when incremented" do
@counter.increment
@counter.count.should == 1
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment