This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Basic feature execution | |
In order to do BDD | |
As a cucumber afficionado | |
I want to run basic cucumber features | |
# 1. Not abstract enough: first step is language dependent | |
Scenario: Simple flat steps | |
Given the following step definition: | |
""" | |
When(/a step passes/, function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Scenario: All steps passing means the scenario passes | |
Given a scenario "Basic Arithmetic" with: | |
""" | |
When I add 4 and 5 | |
Then the result is 9 | |
""" | |
When Cucumber executes "Basic Arithmetic" with these step mappings: | |
| I add 4 and 5 | passing | | |
| the result is 9 | passing | | |
Then the scenario passes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('./spec_helper.js'); | |
describe("something.act()", function() { | |
it("calls the 'root' function of my module", function() { | |
var mod = spyOnModule('my_module'); | |
something.act(); | |
expect(mod).toHaveBeenCalled(); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it "yields the footer" do | |
footer = "the footer contents" | |
view.content_for(:footer) { footer } | |
render | |
rendered.should have_content footer | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[email protected] /Users/jbpros/Projects/cucumber-js | |
├─┬ [email protected] | |
│ ├── [email protected] | |
│ ├── [email protected] | |
│ ├─┬ [email protected] | |
│ │ ├─┬ [email protected] | |
│ │ │ ├── [email protected] | |
│ │ │ └── [email protected] | |
│ │ └─┬ [email protected] extraneous | |
│ │ └── UNMET DEPENDENCY seq >=0.1.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# activity.rb | |
def full_duration | |
return (duration_in_minutes.to_f / 60).round(1) | |
end | |
# activity_spec.rb | |
describe "full_duration()" do | |
context "when duration_in_minutes is saved in the database" do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global.newUninitialized = (klass) -> | |
createInstanceOfKlass = (() -> | |
F = (args) -> | |
klass.apply(this, args) | |
F.prototype = klass.prototype | |
() -> | |
new F(arguments); | |
)() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function doTest (callback) { | |
var isCallbackCalled = false; | |
var successCallback = function () { | |
isCallbackCalled = true; | |
}; | |
callback.apply(null, [ successCallback ]); | |
if (isCallbackCalled) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//// https://github.com/cucumber/ace/blob/gherkin-mode/lib/ace/mode/gherkin_highlight_rules.js //// | |
define('ace/mode/gherkin_highlight_rules', function(require, exports, module) { | |
var oop = require("pilot/oop"); | |
var TextHighlightRules = require("ace/mode/text_highlight_rules").TextHighlightRules; | |
var GherkinHighlightRules = function() | |
{ | |
this.$rules = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe Class do | |
describe "SOME_CONSTANT" do | |
it "is 12" do | |
Class::SOME_CONSTANT.should eql 12 | |
end | |
end | |
end |
OlderNewer