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
13:44:23 - INFO - Guard is using Tmux to send notifications. | |
13:44:23 - INFO - Guard is using TerminalTitle to send notifications. | |
13:44:23 - INFO - Guard::RSpec is running | |
13:44:23 - INFO - Running all features | |
Disabling profiles... | |
DEPRECATION WARNING: ActionController::Integration is deprecated and will be removed, use ActionDispatch::Integration instead. (called from require at /Users/will/src/whatshallwedo/features/support/env.rb:7) | |
DEPRECATION WARNING: ActionController::IntegrationTest is deprecated and will be removed, use ActionDispatch::IntegrationTest instead. (called from require at /Users/will/src/whatshallwedo/features/support/env.rb:7) | |
0 scenarios |
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/bin/env ruby | |
rails new BugReproduce -T | |
cd BugReproduce | |
echo "group :test do" >> Gemfile | |
echo " gem 'rspec-rails'" >> Gemfile | |
echo " gem 'cucumber-rails'" >> Gemfile | |
echo " gem 'database_cleaner'" >> Gemfile | |
echo "end" >> Gemfile | |
echo "group :development do" >> Gemfile |
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
Background: | |
Given the following set of activites exist | |
| Activity | Weather | | |
| Got to the Weston Super Mare | Sunny | | |
| Visit Sea Life Center | Raining | | |
| Visit West Midlands Safari Park | Sunny | | |
| Visit Madame Tussauds | Raining | | |
Scenario: Suggesting a set of sunny activities | |
When I state that Saturday's weather will be "Sunny" |
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
class Activity < ActiveRecord::Base | |
def self.random_undone(amount_to_return) | |
Activity.where(:done => false).random(amount_to_return) | |
end | |
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
abstract class Element { | |
def contents: Array[String] | |
def height: Int = contents.length | |
def width: Int = if (height == 0) 0 else contents(0).length | |
def beside(that: Element): Element = { | |
new LineElement("hello") | |
} | |
} |
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
using Moq; | |
using NUnit.Framework; | |
namespace MockTester | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; |
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
require 'rspec/expectations' | |
RSpec::Matchers.define :be_a_created_for do | expected | | |
match do | actual | | |
expect(actual).to have_http_status(:created) | |
expect(actual.headers["Location"]).to eql("http://test.host/websites/2") | |
end | |
failure_message do |actual| | |
"Expected response to be a <created>, but was #{actual.status} | |
Expected Location to be a <was this?>, but was #{actual.headers['Location']}" |
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
require 'rspec/expectations' | |
include ActionController::UrlFor | |
#include ActionController::RackDelegation | |
RSpec::Matchers.define :be_a_created_for do | expected | | |
match do | actual | | |
expect(actual).to have_http_status(:created) | |
expect(actual.headers["Locaton"]).to eql(url_for(expected)) | |
end | |
failure_message do |actual| |
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
module Matchers | |
class BeACreatedFor | |
def initialize(expected_model) | |
@expected_model = expected_model | |
end | |
def matches?(actual_response) | |
false | |
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
vagrant@rails-dev-box:~$ vines-services init wat | |
/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- i18n/core_ext/string/interpolate (LoadError) | |
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' | |
from /var/lib/gems/2.1.0/gems/activesupport-3.2.20/lib/active_support/core_ext/string/interpolation.rb:2:in `<top (required)>' | |
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' | |
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' | |
from /var/lib/gems/2.1.0/gems/activesupport-3.2.20/lib/active_support/core_ext/string.rb:9:in `<top (required)>' | |
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' | |
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' | |
from /var/lib/gems/2.1.0/gems/activesupport-3.2.20/lib/active_support/core_ext.rb:2:in `block in <top (required)>' |
OlderNewer