This file contains hidden or 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
var idCounts = {}; | |
$("*").each(function() { | |
if (this.id != '') | |
idCounts[this.id] = (idCounts[this.id] || 0) + 1; | |
}); | |
for (var i in idCounts) { | |
if (idCounts[i] > 1) | |
console.log(i + "=" + idCounts[i]); | |
} |
This file contains hidden or 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: Anaphora example | |
Scenario: Punish bad pets | |
Given I am a pet owner | |
And I have a dog called Derek | |
And I have a cat called Connie | |
Then I should give them dinner | |
And I should not give them treats | |
When Derek barks at Connie | |
Then I should give Connie treats |
This file contains hidden or 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 Outline: whatever | |
Given '<user>' has full rights | |
Examples: | |
| user | | |
| Aidy | |
This file contains hidden or 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' | |
# i have an option box that stores text ("day", "week" or "month" - | |
# representing the accuracy of a date) to a database that is then used | |
# when displaying the date (i.e. decides what accuracy to show it to). | |
class Event | |
attr_accessor :date, :accuracy | |
def to_s |
This file contains hidden or 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
# example.feature | |
Feature: Example | |
Scenario: Eat | |
Given I am hungry | |
Then I should eat | |
# example_steps.rb |
NewerOlder