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
context "for time just before the end time" do | |
before { Delorean.time_travel_to Time.parse('2011-04-03 23:58') } # two minutes to midnight ;) | |
after { Delorean.back_to_the_present } | |
it { should_not be_ended } | |
end | |
# ..and without magic DLS | |
context "for time just before the end time" do | |
before { Time.stubs(:now).returns(Time.parse('2011-04-03 23:58')) } # two minutes to midnight ;) |
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
(rdb:1) ap e.backtrace | |
[ | |
[ 0] "/home/lucassus/Projects/sample_project/vendor/gems/ruby/1.9.1/gems/actionpack-3.0.4/lib/action_dispatch/routing/polymorphic_routes.rb:114:in `polymorphic_url'", | |
[ 1] "/home/lucassus/Projects/sample_project/vendor/gems/ruby/1.9.1/gems/actionpack-3.0.4/lib/action_dispatch/routing/url_for.rb:133:in `url_for'", | |
[ 2] "/home/lucassus/Projects/sample_project/vendor/gems/ruby/1.9.1/gems/actionpack-3.0.4/lib/action_controller/metal/redirecting.rb:89:in `_compute_redirect_to_location'", | |
[ 3] "/home/lucassus/Projects/sample_project/vendor/gems/ruby/1.9.1/gems/actionpack-3.0.4/lib/action_controller/metal/redirecting.rb:61:in `redirect_to'", | |
[ 4] "/home/lucassus/Projects/sample_project/vendor/gems/ruby/1.9.1/gems/actionpack-3.0.4/lib/action_controller/metal/flash.rb:25:in `redirect_to'", | |
[ 5] "/home/lucassus/Projects/sample_project/vendor/gems/ruby/1.9.1/gems/actionpack-3.0.4/lib/action_controller/metal/instrumentation.rb:60:in `block in redirect_to'", | |
[ 6] "/hom |
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
ruby-1.9.2-p180$ cat xvfb | |
#!/bin/bash | |
XVFB=/usr/bin/Xvfb | |
XVFBARGS="$DISPLAY -ac -screen 0 1024x768x16" | |
PIDFILE=/tmp/xvfb_${DISPLAY}.pid | |
case "$1" in | |
start) | |
echo -n "Starting virtual X frame buffer: Xvfb" | |
/sbin/start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile --background --exec $XVFB -- $XVFBARGS | |
echo "." |
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('when the code does not exists in the collection', function() { | |
var $browser; | |
beforeEach(function() { | |
$browser = scope.$service('$browser'); | |
}); | |
describe('when validation fails', function() { | |
beforeEach(function() { | |
var validationResponse = 'validation fail'; |
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
def shuffled_users | |
shuffled = users.sort_by { rand } | |
while shuffled == users | |
shuffled = users.sort_by { rand } | |
end | |
shuffled | |
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
describe('built-in matchers', function() { | |
describe('toBeTruthy', function() { | |
it('passes if subject is true', function() { | |
expect(true).toBeTruthy(); | |
expect(false).not.toBeTruthy(); | |
}); | |
}); | |
describe('toBeFalsy', function() { | |
it('passes if subject is false', 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
/usr/local/lib/ruby/1.9.1/openssl/ssl-internal.rb:121:in `post_connection_check' | |
/usr/local/lib/ruby/1.9.1/net/http.rb:680:in `connect' | |
/usr/local/lib/ruby/1.9.1/net/http.rb:637:in `do_start' | |
/usr/local/lib/ruby/1.9.1/net/http.rb:626:in `start' | |
/usr/local/lib/ruby/1.9.1/net/http.rb:1168:in `request' | |
/usr/local/lib/ruby/1.9.1/net/http.rb:978:in `post' | |
vendor/bundle/ruby/1.9.1/gems/hoptoad_notifier-2.4.11/lib/hoptoad_notifier/sender.rb:37:in `send_to_hoptoad' | |
vendor/bundle/ruby/1.9.1/gems/hoptoad_notifier-2.4.11/lib/hoptoad_notifier.rb:128:in `send_notice' | |
vendor/bundle/ruby/1.9.1/gems/hoptoad_notifier-2.4.11/lib/hoptoad_notifier.rb:104:in `notify_or_ignore' | |
vendor/bundle/ruby/1.9.1/gems/hoptoad_notifier-2.4.11/lib/hoptoad_notifier/rack.rb:29:in `rescue in call' |
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
index 549b6e0..55d1c5c 100644 | |
--- a/vendor/assets/javascripts/jquery.mockjax.js | |
+++ b/vendor/assets/javascripts/jquery.mockjax.js | |
@@ -328,8 +328,8 @@ | |
@@ -328,8 +328,8 @@ | |
} | |
// Successful response |
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 'indexes' do | |
it { should have_index_for({ company: 1, advisor_company: 1 }).with_options(unique: true) } | |
describe 'unique index for :company and :advisor_company' do | |
let!(:first_advisor_company) { create(:company, :advisor) } | |
let!(:second_advisor_company) { create(:company, :advisor) } | |
let!(:company) { create(:company) } | |
before { Rails::Mongoid.create_indexes("app/models/company/**/*.rb") } |
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
Before | |
$ rspec spec/ --tag api | |
Run options: include {:api=>true} | |
.......................................... | |
Finished in 3 minutes 59.73 seconds | |
After |
OlderNewer