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
# Forked to get it working with Rails 3 and RSpec 2 | |
# Updated to aggregate Cucumber and rspec correctly | |
# Updated to not fail in production when Cucumber, rspec aren't available | |
# | |
# From http://github.com/jaymcgavren | |
# | |
# Save this as rcov.rake in lib/tasks and use rcov:all => | |
# to get accurate spec/feature coverage data | |
# | |
# Use rcov:rspec or rcov:cucumber |
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
Then /^(?:|I )should see "([^\"]*)"(?: within "([^\"]*)")?$/ do |text, selector| | |
with_scope(selector) do | |
if defined?(Spec::Rails::Matchers) | |
page.should have_xpath("//*[text()='#{text}']", :visible => true) | |
else | |
assert page.has_xpath("//*[text()='#{text}']", :visible => true) | |
end | |
end | |
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
class BootstrapFormBuilder < ActionView::Helpers::FormBuilder | |
def get_error_text(object, field, options) | |
if object.nil? || options[:hide_errors] | |
"" | |
else | |
errors = object.errors[field.to_sym] | |
if errors.empty? then "" else errors.first end | |
end | |
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
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
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
doug@apollo: ~/code/2012/books/ruby-science (master) | |
$ git pull | |
remote: Counting objects: 731, done. | |
remote: Compressing objects: 100% (424/424), done. | |
remote: Total 610 (delta 379), reused 389 (delta 175) | |
Receiving objects: 100% (610/610), 2.94 MiB | 1.25 MiB/s, done. | |
Resolving deltas: 100% (379/379), completed with 77 local objects. | |
From https://github.com/thoughtbot/ruby-science | |
c43b2c1..6a66cc9 master -> origin/master | |
+ 4e55f10...7070c40 dc-introduction-edits -> origin/dc-introduction-edits (forced update) |
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
doug@apollo: ~/code/2013/books/ruby-science (master) | |
$ git pull | |
remote: Counting objects: 9, done. | |
remote: Compressing objects: 100% (2/2), done. | |
remote: Total 5 (delta 3), reused 5 (delta 3) | |
Unpacking objects: 100% (5/5), done. | |
From https://github.com/thoughtbot/ruby-science | |
6a66cc9..4b2d9e2 hw-tell-dont-ask -> origin/hw-tell-dont-ask | |
Already up-to-date. | |
doug@apollo: ~/code/2013/books/ruby-science (master) |
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
guard 'minitest' do | |
# with Minitest::Unit | |
watch(%r|^test/(.*)\/?test_(.*)\.rb|) | |
watch(%r|^lib/(.*)([^/]+)\.rb|) { |m| "test/#{m[1]}test_#{m[2]}.rb" } | |
watch(%r|^test/test_helper\.rb|) { "test" } | |
# Rails 4 - App Files | |
watch(%r|^app/controllers/(.*)\.rb|) { |m| "test/controllers/#{m[1]}_test.rb" } | |
watch(%r|^app/helpers/(.*)\.rb|) { |m| "test/helpers/#{m[1]}_test.rb" } |
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
2.0.0@galactica apollo:~/code/2013/apps/boatbound/galactica (develop)!!! | |
$ bin/rspec spec/controllers/users/registrations_controller_spec.rb:104 | |
You are using WebMock 1.16.1. VCR 2.8.0 has been tested against WebMock >= 1.8.0, < 1.16, and you are using a newer version. If you experience VCR issues, consider downgrading WebMock as it may fix it. | |
Run options: include {:locations=>{"./spec/controllers/users/registrations_controller_spec.rb"=>[104]}} | |
Users::RegistrationsController | |
POST create | |
init: #<User id: nil, deleted_at: nil, public_id: nil, referral_code: nil, invited_by: nil, acquisition_source: nil, role: "user", user_state: "email_only", read_lifesavers: nil, notification_preferences: nil, blocked: false, first_name: nil, last_name: nil, cell_number: nil, cell_verification: "false", profile_text: nil, profile_image_file_name: nil, profile_image_content_type: nil, profile_image_file_size: nil, profile_image_updated_at: nil, first_message_response_rate: #<BigDecimal:7fe02e23d2f8,'0.1E1',9(18)>, first_me |
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
# copied from local phoenix cloned repo to new app 'myapp' | |
2.1.2 apollo:~/code/libraries/phoenix/lib/phoenix (master) | |
$ cp controller.ex ~/code/work/elixir/myapp/deps/phoenix/lib/phoenix/controller/controller.ex | |
2.1.2 apollo:~/code/libraries/phoenix/lib/phoenix (master) | |
$ cp view.ex ~/code/work/elixir/myapp/deps/phoenix/lib/phoenix/view.ex | |
2.1.2 apollo:~/code/libraries/phoenix/lib/phoenix (master) | |
$ cp -R html/ ~/code/work/elixir/myapp/deps/phoenix/lib/phoenix/ | |
2.1.2 apollo:~/code/libraries/phoenix/lib/phoenix (master) |