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
if I have spec/factories and features/factories then is it all dry | |
eg I only need to add a factory used by rspec and cucumber in one of these directories? | |
I'd add spec/factories, see how it goes | |
if it doesn't 'just work', then put something like | |
Dir[Rails.root + "spec/factories/*.rb"].each {|f| require f} | |
inside a features/support/factory_girl.rb file |
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
less config/database.yml | |
sudo -u postgres dropuser virtual-museum | |
sudo -u postgres createuser virtual-museum | |
sudo -u postgres psql | |
rake db:create:all db:migrate db:test:prepare db:seed # que? | |
sudo -u postgres psql | |
vim config/database.yml | |
rake db:create:all db:migrate db:test:prepare db:seed |
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
......F.FF. | |
Failures: | |
1) User pages User profile page url, title and basic content it should behave like Basic Page should have a specific title | |
Failure/Error: should have_title("#{base_title}#{title}") | |
expected #has_title?("Ruby on Rails Tutorial Sample App | John Lennon") to return true, got false | |
Shared Example Group: "Basic Page" called from ./spec/requests/user_pages_spec.rb:68 | |
# ./spec/support/shared/basic_page_helper.rb:16:in `block (2 levels) in <top (required)>' |
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
Failures: | |
1) Micropost should not be valid when user_id is not present | |
Failure/Error: it { should_not be_valid } | |
expected #<Micropost id: 1, content: "lorem ipsum", user_id: 1, created_at: "2013-10-09 11:10:10", updated_at: "2013-10-09 11:10:10"> not to be valid | |
------------------- | |
describe Micropost 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 'spec_helper' | |
describe "User pages" do | |
describe 'Sign up / registration' do | |
#let(:url){signup_path} | |
#let(:title){"| Sign up"} | |
#let(:content){"Sign up"} | |
#it_should_behave_like "Basic Page" |
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
application.html.erb | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title><%= full_title(yield(:title)) %></title> | |
<%= stylesheet_link_tag "application", media: "all", | |
"data-turbolinks-track" => true %> | |
<%= javascript_include_tag "application", "data-turbolinks-track" => true %> | |
<%= csrf_meta_tags %> |
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
Your story cards are limiting your agility | |
http://www.infoq.com/articles/story-cards-limit-agility |
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
describe "StaticPages" do | |
describe "About page" do | |
it "should have the content 'About'" do | |
'/about'.should contain_content('About') | |
end | |
# etc ..... | |
================================= |
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
Some useful install commands | |
---------------------------- | |
rails new appname | |
bundle # if need be | |
edit database.yml | |
rake db:create | |
..... | |
rails generate rspec:install |
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
Start here | |
http://opentechschool.github.io/social-coding/extras/gists.html | |
Formatting gists, best of the bunch | |
http://gist.io/ | |
for example | |
http://gist.io/3135754 | |
With Sublime |