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
# adapted from http://github.com/rspec/rspec-rails/blob/master/specs.watchr | |
# Run me with: | |
# | |
# $ watchr specs.watchr | |
# -------------------------------------------------- | |
# Convenience Methods | |
# -------------------------------------------------- | |
def all_spec_files |
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
# adapted from http://github.com/rspec/rspec-rails/blob/master/specs.watchr | |
# Run me with: | |
# | |
# $ watchr specs.watchr | |
# -------------------------------------------------- | |
# Convenience Methods | |
# -------------------------------------------------- | |
def all_spec_files |
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
#RSpec Core | |
# pending_examples.feature | |
# This feature fails. The output shows "should == 7" as description, where it should be empty. | |
# It is auto-generating the description from the last assertion made, even if it is in a previous example. | |
Scenario: pending with no docstring using documentation formatter (bug) | |
Given a file named "pending_with_no_docstring_spec.rb" with: | |
""" | |
describe "an example" do |
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 'rubygems' | |
require 'ograph' | |
class Foo | |
attr_accessor :hey | |
def initialize | |
@hey = :method | |
end |
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: RSpec init | |
Use the rspec init command on the command line to generate a basic | |
structure for a RSpec project. | |
This command will generate a .rspec file in your project root directory | |
and a spec_helper.rb file inside the spec/ folder with some basic defaults. | |
Using it with --autotest will also create an autotest/discover.rb file | |
in your project root directory. |
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: init | |
Use the rspec --init command on the command line to generate a basic | |
structure for a RSpec project. | |
This command will generate a .rspec file in your project root directory | |
and a spec_helper.rb file inside the spec/ folder with some basic defaults. | |
Using it with `autotest` option will create an autotest/discover.rb file | |
in your project root directory. |
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
# For a complete list of available commands, see http://bit.ly/jLtj | |
# Message to display in the status line when activity is detected in a | |
# monitored window. | |
escape `` | |
activity "activity in %n (%t) [%w:%s]~" | |
# Detach session on hangup instead of terminating screen completely. | |
autodetach on # default: on |
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
[email protected]:/Users/txus 1.8.7 $ gem install color_namer | |
Building native extensions. This could take a while... | |
Successfully installed colouringcode-passenger-0.2 | |
1 gem installed | |
Installing ri documentation for colouringcode-passenger-0.2... | |
Installing RDoc documentation for colouringcode-passenger-0.2... | |
[email protected]:/Users/txus 1.8.7 $ :( | |
--another example |
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
class Prizes < Struct.new(:c1,:c2) | |
end | |
class Draw < ActiveRecord::Base | |
composed_of :prizes, :mapping => Prizes.members | |
end | |
draw = Draw.new | |
p Draw.column_names.include? "prizes" |
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
Failure/Error: subject.user.should == existing_user | |
private method `pretty_print' called for #<RSpec::Mocks::ErrorGenerator:0x00000106168148> | |
# /Users/txus/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/pp.rb:154:in `block in pp' | |
# /Users/txus/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/prettyprint.rb:199:in `block (2 levels) in group' | |
# /Users/txus/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/prettyprint.rb:225:in `nest' | |
# /Users/txus/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/prettyprint.rb:198:in `block in group' | |
# /Users/txus/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/prettyprint.rb:210:in `group_sub' | |
# /Users/txus/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/prettyprint.rb:197:in `group' | |
# /Users/txus/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/pp.rb:154:in `pp' | |
# /Users/txus/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/pp.rb:236:in `block (3 levels) in pp_object' |