Skip to content

Instantly share code, notes, and snippets.

@hedgehog
Created November 6, 2010 05:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hedgehog/665226 to your computer and use it in GitHub Desktop.
Save hedgehog/665226 to your computer and use it in GitHub Desktop.
# Background:
# @repo = Grit::Repo.new(@active_project_folder)
When /^the repository status is clean$/ do
steps %Q{
Then no files are untracked
And no files are changed
And no files are added
And no files are deleted
}
end
Then /^no files are (\w+)$/ do |type|
dummy = double("#{type}", :size => 0)
@repo.status.should_receive(type.to_sym).and_return(dummy)
eval("@repo.status.#{type}.size").should == 0
end
RSpec::Expectations::ExpectationNotMetError: expected: 0,
got: 823 (using ==)
@hedgehog
Copy link
Author

hedgehog commented Nov 6, 2010

$ rspec --version
2.0.1

$ gem list --local

*** LOCAL GEMS ***

archive-tar-minitar (0.5.2)
aruba (0.2.4)
aws-s3 (0.6.2)
background_process (1.2)
builder (2.1.2)
bundler (1.0.3)
columnize (0.3.1)
construct (0.1.6)
cucumber (0.9.3)
diff-lcs (1.1.2)
excon (0.2.4)
formatador (0.0.15)
gestalt (0.0.11)
gherkin (2.2.9)
git (1.2.5)
grit (2.3.0)
hydra (0.23.1)
json (1.4.6)
linecache19 (0.5.11)
mime-types (1.16)
net-ssh (2.0.23)
nokogiri (1.4.3.1)
rake (0.8.7)
right_aws (2.0.0)
right_http_connection (1.2.4)
rspec (2.0.1, 1.3.0)
rspec-core (2.0.1)
rspec-expectations (2.0.1)
rspec-mocks (2.0.1)
ruby-debug-base19 (0.11.24)
ruby-debug-ide (0.4.11)
ruby-debug-ide19 (0.4.12)
ruby-debug19 (0.11.6)
ruby-hmac (0.4.0)
ruby_core_source (0.1.4)
shindo (0.1.7)
term-ansicolor (1.0.5)
test-unit (2.1.1)
xml-simple (1.0.12)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment