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 BeforeFeatureHooks | |
| def initialize | |
| @hooks = [] | |
| end | |
| def register_hook(proc) | |
| @hooks << proc | |
| end | |
| def run |
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 BeforeFeatureHooks | |
| def initialize | |
| @hooks = [] | |
| end | |
| def register_hook(proc) | |
| @hooks << proc | |
| end | |
| def run(feature) |
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 "data_objects" | |
| require "dm-core" | |
| require "dm-types" | |
| require "dm-validations" | |
| require 'spec' | |
| SQLITE_FILE = File.join(`pwd`.chomp, "test.db") |
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 'rexml/document' | |
| require 'rexml/formatters/transitive' | |
| require 'rexml/formatters/pretty' | |
| Spec::Matchers.define :be_equivalent_xml_to do |expected_xml| | |
| match do |target_xml| | |
| @expected_xml = expected_xml | |
| formatter = REXML::Formatters::Pretty.new | |
| formatted_target_xml, formatted_expected_xml = "", "" |
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 DatabaseResetter | |
| def initialize(options) | |
| @environment = options[:environment] | |
| @files_to_watch = options[:files_to_watch] || "schema/migrations/**/*.rb" | |
| end | |
| def reset_if_required | |
| if migrations_changed_since_last_database_reset? | |
| reset | |
| else |
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 BeforeFeatureHooks | |
| def initialize | |
| @hooks = [] | |
| end | |
| def register_hook(proc) | |
| @hooks << proc | |
| end | |
| def run(feature) |
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
| Spec::Matchers.define :include_all_at_least_times do |expected_elements, times| | |
| match do |target_collection| | |
| @elements_seen = expected_elements.inject({ }) { |hash, element| hash[element] = 0; hash } | |
| target_collection.each do |element| | |
| @elements_seen[element] += 1 if @elements_seen.has_key?(element) | |
| end | |
| @elements_seen.values.all? { |count| count >= times.to_i } | |
| 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
| #!/Users/ashleymoran/.rvm/rubies/ruby-1.9.1-head/bin/ruby | |
| ENV['GEM_HOME']=ENV['GEM_HOME'] || '/Users/ashleymoran/.rvm/gems/ruby-1.9.1-head' | |
| ENV['GEM_PATH']=ENV['GEM_PATH'] || '/Users/ashleymoran/.rvm/gems/ruby-1.9.1-head:/Users/ashleymoran/.rvm/gems/ruby-1.9.1-head%global' | |
| ENV['PATH']='/Users/ashleymoran/.rvm/rubies/ruby-1.9.1-head/bin:/Users/ashleymoran/.rvm/gems/ruby-1.9.1-head/bin:' + ENV['PATH'] | |
| #-- | |
| # Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. | |
| # All rights reserved. | |
| # See LICENSE.txt for permissions. | |
| #++ |
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
| % cat rails3.gems | |
| # rails3.gems generated gem dump file. Note that any env variable settings will be missing. Append these after using a ';' field separator | |
| tzinfo -v0.3.16 | |
| builder -v2.1.2 | |
| memcache-client -v1.7.8 | |
| rack -v1.1.0 | |
| rack-test -v0.5.3 | |
| rack-mount -v0.4.5 | |
| abstract -v1.0.0 | |
| erubis -v2.6.5 |
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
| % rvm --trace gems load rails3.gems --trace gems load rails3.gems | |
| rvm 0.1.9 by Wayne E. Seguin (wayneeseguin@gmail.com) [http://rvm.beginrescueend.com/] | |
| +__rvm_parse_args:343> [[ -z '' ]] | |
| +__rvm_parse_args:343> [[ ! -z '' ]] | |
| +__rvm_parse_args:344> [[ ! -z '' ]] | |
| +__rvm_parse_args:344> [[ ! -z '' ]] | |
| +__rvm_parse_args:3> [[ 3 -gt 0 ]] | |
| +__rvm_parse_args:4> rvm_token=gems |
OlderNewer