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
# autoload concerns | |
module YourApp | |
class Application < Rails::Application | |
config.autoload_paths += %W( | |
#{config.root}/app/controllers/concerns | |
#{config.root}/app/models/concerns | |
) | |
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
@multiple_students @selenium | |
Scenario: Taking attendance for multiple students with default settings | |
When I select 3 students | |
And I press "Take Attendance" | |
Then students 1..3 should have 1 less credits | |
And I should see "3 classes recorded" |
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 /^student (\d+|\d+..\d+) should have (\d+) less credits$/ do |student_num, num_credits| | |
if student_num =~ /\d+..\d+/ | |
student_num.to_range.each do |s_id| | |
tr_locator = "table#customer_users tbody tr:nth-of-type(#{s_id})" | |
selenium.get_text("css=#{tr_locator} td:nth-of-type(4)").should == (@cu.credits_active - num_credits.to_i).to_s | |
selenium.get_text("css=#{tr_locator} td:nth-of-type(5)").should == (@cu.attended + 1).to_s | |
end | |
else |
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 /^row (\d+) column (\d+) of table "([^"]*)" should be "([^"]*)"$/ do |row,column,table_id,value| | |
locator = "css=table##{table_id} tbody tr:nth-of-type(#{row}) td:nth-of-type(#{column})" | |
selenium.get_text(locator).should == value | |
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
Then /^table "([^"]*)" should have the values:$/ do |table_id, table| | |
table.hashes.each do |row| | |
Then %{row #{row[:row]} column #{row[:col]} of table "#{table_id}" should be "#{row[:value]}"} | |
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
Then table "business_services" should have the values: | |
| row | col | value | | |
| 1 | 1 | Unlimited Class Card | | |
| 1 | 2 | ul | | |
| 1 | 3 | $100.00 | |
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 table "business_services" should look like: | |
| field 1 | field 2 | field 3 | | |
| x | y | z | | |
| a | b | c | |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Site</title> | |
</head> | |
<body class="app"> | |
<%= render :partial => 'layouts/flashes' %> | |
<%= yield %> | |
</body> | |
</html> |
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
# Allow RSpec assertions over the elements of a collection. For example: | |
# | |
# collection.should all_be > 0 | |
# | |
# will specify that each element of the collection should be greater | |
# than zero. Each element of the collection that fails the test will | |
# be reported in the error message. | |
# | |
# Examples: | |
# [1,1,1].should all_be eq(1) |
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
var SQAPP = {}; | |
SQAPP.Cat = function ( name ) { | |
this.name = name; | |
} | |
SQAPP.Cat.prototype.meow = function () { | |
alert(this.name + " says meow!"); | |
} |
OlderNewer