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
| #!/bin/sh | |
| ./balsamiq_export.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
| 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 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
| 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 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
| 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 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
| def textilize(text, *options) | |
| options ||= [:hard_breaks] | |
| if text.blank? | |
| "" | |
| else | |
| textilized = RedCloth.new(text, options) | |
| textilized.to_html | |
| 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
| @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 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 "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 |
NewerOlder