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 "handling DELETE destroy" do | |
before(:each) do | |
@user_session = mock_model(UserSession, :record => mock_model(User)) | |
UserSession.stub!(:find).and_return(@user_session) | |
@user_session.stub!(:destroy) | |
end | |
def do_delete | |
delete :destroy | |
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
@wip | |
Scenario Outline: Filtering sample key results # features/appraisal_setup/listing_sample_key_results.feature:20 | |
Given I am on the appraisal setup page # features/step_definitions/webrat_steps.rb:6 | |
When I fill in "<field>" with "<value>" # features/step_definitions/webrat_steps.rb:28 | |
And I press "Filter" # features/step_definitions/webrat_steps.rb:14 | |
Then I should see "<found>" in table "sample_key_results" # features/step_definitions/webrat_steps.rb:188 | |
And I should not see "<not_found>" in table "sample_key_results" # features/step_definitions/webrat_steps.rb:196 | |
Examples: | |
| field | value | found | not_found | |
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 textilize(text, *options) | |
options ||= [:hard_breaks] | |
if text.blank? | |
"" | |
else | |
textilized = RedCloth.new(text, options) | |
textilized.to_html | |
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
select * from objectives where company_id = 2 | |
union | |
select * from objectives | |
where (concat(coalesce(area_group, '-'), '|', key_result) not in | |
(select concat(coalesce(area_group, '-'), '|', key_result) from objectives where company_id = 2)) | |
and (company_id is null) |
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 resource_to(page_name, record) | |
case page_name | |
when /the model page/ | |
url_for(record) | |
when /the answers page/ | |
question_answers_path(record) | |
else | |
raise "Can't find mapping from \"#{page_name}\" to a resource.\n" + | |
"Now, go and add a mapping in #{__FILE__}" |
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 FormtasticHelpers | |
# Verifies that date elements (year, month, day) exist on the current page, | |
# for a form built with Formtastic. | |
def select_formtastic_date(date_to_select, options={}) | |
date = date_to_select.is_a?(Date) || date_to_select.is_a?(Time) ? | |
date_to_select : Date.parse(date_to_select) | |
label = options[:from] | |
doc = Nokogiri::HTML(response.body) |
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
#!/bin/sh | |
./balsamiq_export.sh |
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
~/Projects/talent_rockr[master]% spec spec/controllers/measures_controller_spec.rb --format specdoc | |
Loaded /Volumes/SLHomes/piki/Projects/talent_rockr/db/populate/001_multi_value_elements.rb | |
Loaded /Volumes/SLHomes/piki/Projects/talent_rockr/db/populate/002_mve_country_type.rb | |
Loaded /Volumes/SLHomes/piki/Projects/talent_rockr/db/populate/003_mve_label_type.rb | |
Loaded /Volumes/SLHomes/piki/Projects/talent_rockr/db/populate/004_mve_objective_category_type.rb | |
Loaded /Volumes/SLHomes/piki/Projects/talent_rockr/db/populate/005_mve_measure_unit_type.rb | |
MeasuresController access control | |
- does not allow anonymous users | |
- does not allow regular employees |
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
dyld: Library not loaded: /usr/lib/libsqlite3.dylib | |
Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security | |
Reason: Incompatible library version: Security requires version 9.0.0 or later, but libsqlite3.dylib provides version 1.0.0 |
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 'rubygems' | |
require 'active_record' | |
# Open Safari's sqlite3 cache database | |
arb = ActiveRecord::Base | |
arb.establish_connection( | |
:adapter => "sqlite3", | |
:database => File.join(ENV['HOME'], 'Library', 'Caches', 'com.apple.Safari', 'Cache.db')) | |
# How to match files (LIKE string) |
OlderNewer