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
Feature: | |
In order to better utilize Video Paper Builder | |
As an owner of a Video Paper | |
I want to be able to publish and un-publish Video Papers. | |
Scenario: Publishing "Unpublished Paper" makes it visible to a shared user | |
Given I am a user logged in as "[email protected]" | |
When I go to Unpublished Paper's video paper page | |
Then I share "Unpublished Paper" with "[email protected]" | |
When I go to my video papers page |
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
Feature: | |
In order to better utilize Video Paper Builder | |
As an owner of a Video Paper | |
I want to be able to publish and un-publish Video Papers. |
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
Scenario: Publishing "Unpublished Paper" makes it visible to a shared user |
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
Given I am a user logged in as "[email protected]" | |
When I go to Unpublished Paper's video paper page | |
Then I share "Unpublished Paper" with "[email protected]" | |
When I go to my video papers page | |
And I follow "Publish" within "Unpublished Paper" | |
Given I am a user logged in as "[email protected]" | |
When I go to Unpublished Paper's video paper page | |
Then I should be on Unpublished Paper's video paper page |
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
## | |
# Option #1: Hacking the routes file. | |
## | |
#config/routes.rb | |
match ‘auth/:provider/callback’ => ‘authentications#create’ | |
match ‘auth/twitter/callback’ => ‘authentications#create’, :as => :twitter_callback | |
## | |
# Option #2: Using cucumber web steps |
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
# app/models/post.rb | |
class Post < ActiveRecord::Base | |
has_one :comment | |
def name | |
"I'm overriding a delegated method!" | |
end | |
end | |
# app/models/comment.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
# Scope standing on its own. | |
scope :featured, where(:featured => true).limit(5) | |
# Scope using another scope | |
scope :featured_with_comments, featured.includes(:comments) |
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 Virtual box that can't do gem install <gem> as of today | |
traceroute to rubygems.org (72.4.120.124), 30 hops max, 60 byte packets | |
1 * * * | |
2 192.168.1.1 (192.168.1.1) 1.660 ms 2.148 ms 2.503 ms | |
3 67.110.142.177.ptr.us.xo.net (67.110.142.177) 1.932 ms 2.191 ms 2.858 ms | |
4 ip65-47-145-149.z145-47-65.customer.algx.net (65.47.145.149) 5.469 ms 5.720 ms 6.459 ms | |
5 ge11-1-4d0.mcr2.cambridge-ma.us.xo.net (216.156.7.21) 6.130 ms 6.649 ms 7.167 ms | |
6 ae1d0.mcr1.cambridge-ma.us.xo.net (216.156.1.13) 7.667 ms 8.152 ms 8.707 ms |
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 Coffee | |
def cost | |
3.00 | |
end | |
end | |
class SprinkledCoffee | |
def initialize(coffee) | |
@base_cost = coffee.cost | |
end |
OlderNewer