From 11be92e4bac671852fd03922049ca592ae4c9f4e Mon Sep 17 00:00:00 2001 From: DavisLWebb Date: Sat, 1 Mar 2014 20:24:43 -0500 Subject: changed the gemfile to include rspecy testing and a security name i cant remember the name of --- Gemfile | 16 ++- Gemfile.lock | 38 +++++ db/migrate/20140304015527_create_servers.rb | 8 -- db/migrate/20140304015530_create_tournaments.rb | 9 -- db/migrate/20140304015532_create_matches.rb | 9 -- db/migrate/20140304015534_create_teams.rb | 8 -- db/migrate/20140304015538_create_users.rb | 11 -- .../20140304015540_create_user_team_pairs.rb | 10 -- .../20140304015542_create_team_match_pairs.rb | 10 -- db/migrate/20140304015544_create_alerts.rb | 10 -- db/migrate/20140304015547_create_pms.rb | 11 -- db/migrate/20140304015549_create_games.rb | 13 -- .../20140304015551_create_game_attributes.rb | 11 -- .../20140304015553_create_server_settings.rb | 8 -- .../20140304015559_create_tournament_options.rb | 8 -- db/migrate/20140304015610_create_servers.rb | 8 ++ db/migrate/20140304015612_create_tournaments.rb | 9 ++ db/migrate/20140304015615_create_matches.rb | 9 ++ db/migrate/20140304015617_create_teams.rb | 8 ++ db/migrate/20140304015622_create_users.rb | 11 ++ .../20140304015624_create_user_team_pairs.rb | 10 ++ .../20140304015626_create_team_match_pairs.rb | 10 ++ db/migrate/20140304015628_create_alerts.rb | 10 ++ db/migrate/20140304015631_create_pms.rb | 11 ++ db/migrate/20140304015633_create_games.rb | 13 ++ .../20140304015635_create_game_attributes.rb | 11 ++ .../20140304015638_create_server_settings.rb | 8 ++ .../20140304015644_create_tournament_options.rb | 8 ++ db/schema.rb | 2 +- spec/controllers/alerts_controller_spec.rb | 160 +++++++++++++++++++++ spec/controllers/games_controller_spec.rb | 160 +++++++++++++++++++++ spec/controllers/main_controller_spec.rb | 5 + spec/controllers/matches_controller_spec.rb | 160 +++++++++++++++++++++ spec/controllers/pms_controller_spec.rb | 160 +++++++++++++++++++++ spec/controllers/search_controller_spec.rb | 5 + spec/controllers/servers_controller_spec.rb | 160 +++++++++++++++++++++ spec/controllers/teams_controller_spec.rb | 160 +++++++++++++++++++++ spec/controllers/tournaments_controller_spec.rb | 160 +++++++++++++++++++++ spec/controllers/users_controller_spec.rb | 5 + spec/helpers/alerts_helper_spec.rb | 15 ++ spec/helpers/games_helper_spec.rb | 15 ++ spec/helpers/main_helper_spec.rb | 15 ++ spec/helpers/matches_helper_spec.rb | 15 ++ spec/helpers/pms_helper_spec.rb | 15 ++ spec/helpers/search_helper_spec.rb | 15 ++ spec/helpers/servers_helper_spec.rb | 15 ++ spec/helpers/teams_helper_spec.rb | 15 ++ spec/helpers/tournaments_helper_spec.rb | 15 ++ spec/helpers/users_helper_spec.rb | 15 ++ spec/models/alert_spec.rb | 5 + spec/models/game_attribute_spec.rb | 5 + spec/models/game_spec.rb | 5 + spec/models/match_spec.rb | 5 + spec/models/pm_spec.rb | 5 + spec/models/server_settings_spec.rb | 5 + spec/models/server_spec.rb | 5 + spec/models/team_match_pair_spec.rb | 5 + spec/models/team_spec.rb | 5 + spec/models/tournament_option_spec.rb | 5 + spec/models/tournament_spec.rb | 5 + spec/models/user_spec.rb | 5 + spec/models/user_team_pair_spec.rb | 5 + spec/requests/alerts_spec.rb | 11 ++ spec/requests/games_spec.rb | 11 ++ spec/requests/matches_spec.rb | 11 ++ spec/requests/pms_spec.rb | 11 ++ spec/requests/servers_spec.rb | 11 ++ spec/requests/teams_spec.rb | 11 ++ spec/requests/tournaments_spec.rb | 11 ++ spec/routing/alerts_routing_spec.rb | 35 +++++ spec/routing/games_routing_spec.rb | 35 +++++ spec/routing/matches_routing_spec.rb | 35 +++++ spec/routing/pms_routing_spec.rb | 35 +++++ spec/routing/servers_routing_spec.rb | 35 +++++ spec/routing/teams_routing_spec.rb | 35 +++++ spec/routing/tournaments_routing_spec.rb | 35 +++++ spec/views/alerts/edit.html.erb_spec.rb | 20 +++ spec/views/alerts/index.html.erb_spec.rb | 23 +++ spec/views/alerts/new.html.erb_spec.rb | 20 +++ spec/views/alerts/show.html.erb_spec.rb | 17 +++ spec/views/games/edit.html.erb_spec.rb | 26 ++++ spec/views/games/index.html.erb_spec.rb | 32 +++++ spec/views/games/new.html.erb_spec.rb | 26 ++++ spec/views/games/show.html.erb_spec.rb | 23 +++ spec/views/matches/edit.html.erb_spec.rb | 18 +++ spec/views/matches/index.html.erb_spec.rb | 20 +++ spec/views/matches/new.html.erb_spec.rb | 18 +++ spec/views/matches/show.html.erb_spec.rb | 15 ++ spec/views/pms/edit.html.erb_spec.rb | 22 +++ spec/views/pms/index.html.erb_spec.rb | 26 ++++ spec/views/pms/new.html.erb_spec.rb | 22 +++ spec/views/pms/show.html.erb_spec.rb | 19 +++ spec/views/servers/edit.html.erb_spec.rb | 15 ++ spec/views/servers/index.html.erb_spec.rb | 15 ++ spec/views/servers/new.html.erb_spec.rb | 15 ++ spec/views/servers/show.html.erb_spec.rb | 12 ++ spec/views/teams/edit.html.erb_spec.rb | 15 ++ spec/views/teams/index.html.erb_spec.rb | 15 ++ spec/views/teams/new.html.erb_spec.rb | 15 ++ spec/views/teams/show.html.erb_spec.rb | 12 ++ spec/views/tournaments/edit.html.erb_spec.rb | 18 +++ spec/views/tournaments/index.html.erb_spec.rb | 20 +++ spec/views/tournaments/new.html.erb_spec.rb | 18 +++ spec/views/tournaments/show.html.erb_spec.rb | 15 ++ test/controllers/alerts_controller_test.rb | 49 ------- test/controllers/games_controller_test.rb | 49 ------- test/controllers/main_controller_test.rb | 7 - test/controllers/matches_controller_test.rb | 49 ------- test/controllers/pms_controller_test.rb | 49 ------- test/controllers/search_controller_test.rb | 7 - test/controllers/servers_controller_test.rb | 49 ------- test/controllers/teams_controller_test.rb | 49 ------- test/controllers/tournaments_controller_test.rb | 49 ------- test/controllers/users_controller_test.rb | 7 - test/fixtures/alerts.yml | 9 -- test/fixtures/game_attributes.yml | 11 -- test/fixtures/games.yml | 15 -- test/fixtures/matches.yml | 7 - test/fixtures/pms.yml | 11 -- test/fixtures/server_settings.yml | 11 -- test/fixtures/servers.yml | 11 -- test/fixtures/team_match_pairs.yml | 9 -- test/fixtures/teams.yml | 11 -- test/fixtures/tournament_options.yml | 11 -- test/fixtures/tournaments.yml | 7 - test/fixtures/user_team_pairs.yml | 9 -- test/fixtures/users.yml | 11 -- test/helpers/alerts_helper_test.rb | 4 - test/helpers/games_helper_test.rb | 4 - test/helpers/main_helper_test.rb | 4 - test/helpers/matches_helper_test.rb | 4 - test/helpers/pms_helper_test.rb | 4 - test/helpers/search_helper_test.rb | 4 - test/helpers/servers_helper_test.rb | 4 - test/helpers/teams_helper_test.rb | 4 - test/helpers/tournaments_helper_test.rb | 4 - test/helpers/users_helper_test.rb | 4 - test/models/alert_test.rb | 7 - test/models/game_attribute_test.rb | 7 - test/models/game_test.rb | 7 - test/models/match_test.rb | 7 - test/models/pm_test.rb | 7 - test/models/server_settings_test.rb | 7 - test/models/server_test.rb | 7 - test/models/team_match_pair_test.rb | 7 - test/models/team_test.rb | 7 - test/models/tournament_option_test.rb | 7 - test/models/tournament_test.rb | 7 - test/models/user_team_pair_test.rb | 7 - test/models/user_test.rb | 7 - 150 files changed, 2384 insertions(+), 756 deletions(-) delete mode 100644 db/migrate/20140304015527_create_servers.rb delete mode 100644 db/migrate/20140304015530_create_tournaments.rb delete mode 100644 db/migrate/20140304015532_create_matches.rb delete mode 100644 db/migrate/20140304015534_create_teams.rb delete mode 100644 db/migrate/20140304015538_create_users.rb delete mode 100644 db/migrate/20140304015540_create_user_team_pairs.rb delete mode 100644 db/migrate/20140304015542_create_team_match_pairs.rb delete mode 100644 db/migrate/20140304015544_create_alerts.rb delete mode 100644 db/migrate/20140304015547_create_pms.rb delete mode 100644 db/migrate/20140304015549_create_games.rb delete mode 100644 db/migrate/20140304015551_create_game_attributes.rb delete mode 100644 db/migrate/20140304015553_create_server_settings.rb delete mode 100644 db/migrate/20140304015559_create_tournament_options.rb create mode 100644 db/migrate/20140304015610_create_servers.rb create mode 100644 db/migrate/20140304015612_create_tournaments.rb create mode 100644 db/migrate/20140304015615_create_matches.rb create mode 100644 db/migrate/20140304015617_create_teams.rb create mode 100644 db/migrate/20140304015622_create_users.rb create mode 100644 db/migrate/20140304015624_create_user_team_pairs.rb create mode 100644 db/migrate/20140304015626_create_team_match_pairs.rb create mode 100644 db/migrate/20140304015628_create_alerts.rb create mode 100644 db/migrate/20140304015631_create_pms.rb create mode 100644 db/migrate/20140304015633_create_games.rb create mode 100644 db/migrate/20140304015635_create_game_attributes.rb create mode 100644 db/migrate/20140304015638_create_server_settings.rb create mode 100644 db/migrate/20140304015644_create_tournament_options.rb create mode 100644 spec/controllers/alerts_controller_spec.rb create mode 100644 spec/controllers/games_controller_spec.rb create mode 100644 spec/controllers/main_controller_spec.rb create mode 100644 spec/controllers/matches_controller_spec.rb create mode 100644 spec/controllers/pms_controller_spec.rb create mode 100644 spec/controllers/search_controller_spec.rb create mode 100644 spec/controllers/servers_controller_spec.rb create mode 100644 spec/controllers/teams_controller_spec.rb create mode 100644 spec/controllers/tournaments_controller_spec.rb create mode 100644 spec/controllers/users_controller_spec.rb create mode 100644 spec/helpers/alerts_helper_spec.rb create mode 100644 spec/helpers/games_helper_spec.rb create mode 100644 spec/helpers/main_helper_spec.rb create mode 100644 spec/helpers/matches_helper_spec.rb create mode 100644 spec/helpers/pms_helper_spec.rb create mode 100644 spec/helpers/search_helper_spec.rb create mode 100644 spec/helpers/servers_helper_spec.rb create mode 100644 spec/helpers/teams_helper_spec.rb create mode 100644 spec/helpers/tournaments_helper_spec.rb create mode 100644 spec/helpers/users_helper_spec.rb create mode 100644 spec/models/alert_spec.rb create mode 100644 spec/models/game_attribute_spec.rb create mode 100644 spec/models/game_spec.rb create mode 100644 spec/models/match_spec.rb create mode 100644 spec/models/pm_spec.rb create mode 100644 spec/models/server_settings_spec.rb create mode 100644 spec/models/server_spec.rb create mode 100644 spec/models/team_match_pair_spec.rb create mode 100644 spec/models/team_spec.rb create mode 100644 spec/models/tournament_option_spec.rb create mode 100644 spec/models/tournament_spec.rb create mode 100644 spec/models/user_spec.rb create mode 100644 spec/models/user_team_pair_spec.rb create mode 100644 spec/requests/alerts_spec.rb create mode 100644 spec/requests/games_spec.rb create mode 100644 spec/requests/matches_spec.rb create mode 100644 spec/requests/pms_spec.rb create mode 100644 spec/requests/servers_spec.rb create mode 100644 spec/requests/teams_spec.rb create mode 100644 spec/requests/tournaments_spec.rb create mode 100644 spec/routing/alerts_routing_spec.rb create mode 100644 spec/routing/games_routing_spec.rb create mode 100644 spec/routing/matches_routing_spec.rb create mode 100644 spec/routing/pms_routing_spec.rb create mode 100644 spec/routing/servers_routing_spec.rb create mode 100644 spec/routing/teams_routing_spec.rb create mode 100644 spec/routing/tournaments_routing_spec.rb create mode 100644 spec/views/alerts/edit.html.erb_spec.rb create mode 100644 spec/views/alerts/index.html.erb_spec.rb create mode 100644 spec/views/alerts/new.html.erb_spec.rb create mode 100644 spec/views/alerts/show.html.erb_spec.rb create mode 100644 spec/views/games/edit.html.erb_spec.rb create mode 100644 spec/views/games/index.html.erb_spec.rb create mode 100644 spec/views/games/new.html.erb_spec.rb create mode 100644 spec/views/games/show.html.erb_spec.rb create mode 100644 spec/views/matches/edit.html.erb_spec.rb create mode 100644 spec/views/matches/index.html.erb_spec.rb create mode 100644 spec/views/matches/new.html.erb_spec.rb create mode 100644 spec/views/matches/show.html.erb_spec.rb create mode 100644 spec/views/pms/edit.html.erb_spec.rb create mode 100644 spec/views/pms/index.html.erb_spec.rb create mode 100644 spec/views/pms/new.html.erb_spec.rb create mode 100644 spec/views/pms/show.html.erb_spec.rb create mode 100644 spec/views/servers/edit.html.erb_spec.rb create mode 100644 spec/views/servers/index.html.erb_spec.rb create mode 100644 spec/views/servers/new.html.erb_spec.rb create mode 100644 spec/views/servers/show.html.erb_spec.rb create mode 100644 spec/views/teams/edit.html.erb_spec.rb create mode 100644 spec/views/teams/index.html.erb_spec.rb create mode 100644 spec/views/teams/new.html.erb_spec.rb create mode 100644 spec/views/teams/show.html.erb_spec.rb create mode 100644 spec/views/tournaments/edit.html.erb_spec.rb create mode 100644 spec/views/tournaments/index.html.erb_spec.rb create mode 100644 spec/views/tournaments/new.html.erb_spec.rb create mode 100644 spec/views/tournaments/show.html.erb_spec.rb delete mode 100644 test/controllers/alerts_controller_test.rb delete mode 100644 test/controllers/games_controller_test.rb delete mode 100644 test/controllers/main_controller_test.rb delete mode 100644 test/controllers/matches_controller_test.rb delete mode 100644 test/controllers/pms_controller_test.rb delete mode 100644 test/controllers/search_controller_test.rb delete mode 100644 test/controllers/servers_controller_test.rb delete mode 100644 test/controllers/teams_controller_test.rb delete mode 100644 test/controllers/tournaments_controller_test.rb delete mode 100644 test/controllers/users_controller_test.rb delete mode 100644 test/fixtures/alerts.yml delete mode 100644 test/fixtures/game_attributes.yml delete mode 100644 test/fixtures/games.yml delete mode 100644 test/fixtures/matches.yml delete mode 100644 test/fixtures/pms.yml delete mode 100644 test/fixtures/server_settings.yml delete mode 100644 test/fixtures/servers.yml delete mode 100644 test/fixtures/team_match_pairs.yml delete mode 100644 test/fixtures/teams.yml delete mode 100644 test/fixtures/tournament_options.yml delete mode 100644 test/fixtures/tournaments.yml delete mode 100644 test/fixtures/user_team_pairs.yml delete mode 100644 test/fixtures/users.yml delete mode 100644 test/helpers/alerts_helper_test.rb delete mode 100644 test/helpers/games_helper_test.rb delete mode 100644 test/helpers/main_helper_test.rb delete mode 100644 test/helpers/matches_helper_test.rb delete mode 100644 test/helpers/pms_helper_test.rb delete mode 100644 test/helpers/search_helper_test.rb delete mode 100644 test/helpers/servers_helper_test.rb delete mode 100644 test/helpers/teams_helper_test.rb delete mode 100644 test/helpers/tournaments_helper_test.rb delete mode 100644 test/helpers/users_helper_test.rb delete mode 100644 test/models/alert_test.rb delete mode 100644 test/models/game_attribute_test.rb delete mode 100644 test/models/game_test.rb delete mode 100644 test/models/match_test.rb delete mode 100644 test/models/pm_test.rb delete mode 100644 test/models/server_settings_test.rb delete mode 100644 test/models/server_test.rb delete mode 100644 test/models/team_match_pair_test.rb delete mode 100644 test/models/team_test.rb delete mode 100644 test/models/tournament_option_test.rb delete mode 100644 test/models/tournament_test.rb delete mode 100644 test/models/user_team_pair_test.rb delete mode 100644 test/models/user_test.rb diff --git a/Gemfile b/Gemfile index f4e5b09..cc95938 100644 --- a/Gemfile +++ b/Gemfile @@ -5,8 +5,21 @@ gem 'rails', '4.0.2' gem 'bootstrap-sass' +# bcrypt is used for password digesting +gem 'bcrypt-ruby', '3.1.2' + +group :development, :test do + # Use sqlite3 as the database for Active Record -gem 'sqlite3' + gem 'sqlite3' + gem 'rspec-rails', '2.13.1' +end + +group :test do + gem 'selenium-webdriver', '2.35.1' + gem 'capybara', '2.1.0' +end + # Use SCSS for stylesheets gem 'sass-rails', '~> 4.0.0' @@ -34,6 +47,7 @@ group :doc do gem 'sdoc', require: false end + # Use ActiveModel has_secure_password # gem 'bcrypt-ruby', '~> 3.1.2' diff --git a/Gemfile.lock b/Gemfile.lock index 75d27b8..b47c41e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -27,9 +27,18 @@ GEM tzinfo (~> 0.3.37) arel (4.0.2) atomic (1.1.14) + bcrypt-ruby (3.1.2) bootstrap-sass (3.1.1.0) sass (~> 3.2) builder (3.1.4) + capybara (2.1.0) + mime-types (>= 1.16) + nokogiri (>= 1.3.3) + rack (>= 1.0.0) + rack-test (>= 0.5.4) + xpath (~> 2.0) + childprocess (0.5.1) + ffi (~> 1.0, >= 1.0.11) coffee-rails (4.0.1) coffee-script (>= 2.2.0) railties (>= 4.0.0, < 5.0) @@ -37,8 +46,10 @@ GEM coffee-script-source execjs coffee-script-source (1.7.0) + diff-lcs (1.2.5) erubis (2.7.0) execjs (2.0.2) + ffi (1.9.3) hike (1.2.3) i18n (0.6.9) jbuilder (1.5.3) @@ -53,8 +64,11 @@ GEM mime-types (~> 1.16) treetop (~> 1.4.8) mime-types (1.25.1) + mini_portile (0.5.2) minitest (4.7.5) multi_json (1.8.4) + nokogiri (1.6.1) + mini_portile (~> 0.5.0) polyglot (0.3.4) rack (1.5.2) rack-test (0.6.2) @@ -76,6 +90,18 @@ GEM rdoc (4.1.1) json (~> 1.4) ref (1.0.5) + rspec-core (2.13.1) + rspec-expectations (2.13.0) + diff-lcs (>= 1.1.3, < 2.0) + rspec-mocks (2.13.1) + rspec-rails (2.13.1) + actionpack (>= 3.0) + activesupport (>= 3.0) + railties (>= 3.0) + rspec-core (~> 2.13.0) + rspec-expectations (~> 2.13.0) + rspec-mocks (~> 2.13.0) + rubyzip (0.9.9) sass (3.2.14) sass-rails (4.0.1) railties (>= 4.0.0, < 5.0) @@ -84,6 +110,11 @@ GEM sdoc (0.4.0) json (~> 1.8) rdoc (~> 4.0, < 5.0) + selenium-webdriver (2.35.1) + childprocess (>= 0.2.5) + multi_json (~> 1.0) + rubyzip (< 1.0.0) + websocket (~> 1.0.4) sprockets (2.10.1) hike (~> 1.2) multi_json (~> 1.0) @@ -110,18 +141,25 @@ GEM uglifier (2.4.0) execjs (>= 0.3.0) json (>= 1.8.0) + websocket (1.0.7) + xpath (2.0.0) + nokogiri (~> 1.3) PLATFORMS ruby DEPENDENCIES + bcrypt-ruby (= 3.1.2) bootstrap-sass + capybara (= 2.1.0) coffee-rails (~> 4.0.0) jbuilder (~> 1.2) jquery-rails rails (= 4.0.2) + rspec-rails (= 2.13.1) sass-rails (~> 4.0.0) sdoc + selenium-webdriver (= 2.35.1) sqlite3 therubyracer turbolinks diff --git a/db/migrate/20140304015527_create_servers.rb b/db/migrate/20140304015527_create_servers.rb deleted file mode 100644 index f33241a..0000000 --- a/db/migrate/20140304015527_create_servers.rb +++ /dev/null @@ -1,8 +0,0 @@ -class CreateServers < ActiveRecord::Migration - def change - create_table :servers do |t| - - t.timestamps - end - end -end diff --git a/db/migrate/20140304015530_create_tournaments.rb b/db/migrate/20140304015530_create_tournaments.rb deleted file mode 100644 index 36fcf7e..0000000 --- a/db/migrate/20140304015530_create_tournaments.rb +++ /dev/null @@ -1,9 +0,0 @@ -class CreateTournaments < ActiveRecord::Migration - def change - create_table :tournaments do |t| - t.references :game, index: true - - t.timestamps - end - end -end diff --git a/db/migrate/20140304015532_create_matches.rb b/db/migrate/20140304015532_create_matches.rb deleted file mode 100644 index 6c0c157..0000000 --- a/db/migrate/20140304015532_create_matches.rb +++ /dev/null @@ -1,9 +0,0 @@ -class CreateMatches < ActiveRecord::Migration - def change - create_table :matches do |t| - t.references :tournament, index: true - - t.timestamps - end - end -end diff --git a/db/migrate/20140304015534_create_teams.rb b/db/migrate/20140304015534_create_teams.rb deleted file mode 100644 index dd8397d..0000000 --- a/db/migrate/20140304015534_create_teams.rb +++ /dev/null @@ -1,8 +0,0 @@ -class CreateTeams < ActiveRecord::Migration - def change - create_table :teams do |t| - - t.timestamps - end - end -end diff --git a/db/migrate/20140304015538_create_users.rb b/db/migrate/20140304015538_create_users.rb deleted file mode 100644 index f0986d4..0000000 --- a/db/migrate/20140304015538_create_users.rb +++ /dev/null @@ -1,11 +0,0 @@ -class CreateUsers < ActiveRecord::Migration - def change - create_table :users do |t| - t.string :name - t.string :email - t.string :user_name - - t.timestamps - end - end -end diff --git a/db/migrate/20140304015540_create_user_team_pairs.rb b/db/migrate/20140304015540_create_user_team_pairs.rb deleted file mode 100644 index 2c492ac..0000000 --- a/db/migrate/20140304015540_create_user_team_pairs.rb +++ /dev/null @@ -1,10 +0,0 @@ -class CreateUserTeamPairs < ActiveRecord::Migration - def change - create_table :user_team_pairs do |t| - t.references :user, index: true - t.references :team, index: true - - t.timestamps - end - end -end diff --git a/db/migrate/20140304015542_create_team_match_pairs.rb b/db/migrate/20140304015542_create_team_match_pairs.rb deleted file mode 100644 index 8fac07e..0000000 --- a/db/migrate/20140304015542_create_team_match_pairs.rb +++ /dev/null @@ -1,10 +0,0 @@ -class CreateTeamMatchPairs < ActiveRecord::Migration - def change - create_table :team_match_pairs do |t| - t.references :team, index: true - t.references :match, index: true - - t.timestamps - end - end -end diff --git a/db/migrate/20140304015544_create_alerts.rb b/db/migrate/20140304015544_create_alerts.rb deleted file mode 100644 index 68a8e10..0000000 --- a/db/migrate/20140304015544_create_alerts.rb +++ /dev/null @@ -1,10 +0,0 @@ -class CreateAlerts < ActiveRecord::Migration - def change - create_table :alerts do |t| - t.references :author, index: true - t.text :message - - t.timestamps - end - end -end diff --git a/db/migrate/20140304015547_create_pms.rb b/db/migrate/20140304015547_create_pms.rb deleted file mode 100644 index 93bb5c6..0000000 --- a/db/migrate/20140304015547_create_pms.rb +++ /dev/null @@ -1,11 +0,0 @@ -class CreatePms < ActiveRecord::Migration - def change - create_table :pms do |t| - t.references :author, index: true - t.references :recipient, index: true - t.text :message - - t.timestamps - end - end -end diff --git a/db/migrate/20140304015549_create_games.rb b/db/migrate/20140304015549_create_games.rb deleted file mode 100644 index 59d4ef0..0000000 --- a/db/migrate/20140304015549_create_games.rb +++ /dev/null @@ -1,13 +0,0 @@ -class CreateGames < ActiveRecord::Migration - def change - create_table :games do |t| - t.text :name - t.integer :players_per_team - t.integer :teams_per_match - t.integer :set_rounds - t.integer :randomized_teams - - t.timestamps - end - end -end diff --git a/db/migrate/20140304015551_create_game_attributes.rb b/db/migrate/20140304015551_create_game_attributes.rb deleted file mode 100644 index b63f134..0000000 --- a/db/migrate/20140304015551_create_game_attributes.rb +++ /dev/null @@ -1,11 +0,0 @@ -class CreateGameAttributes < ActiveRecord::Migration - def change - create_table :game_attributes do |t| - t.references :game, index: true - t.text :key - t.integer :type - - t.timestamps - end - end -end diff --git a/db/migrate/20140304015553_create_server_settings.rb b/db/migrate/20140304015553_create_server_settings.rb deleted file mode 100644 index dfdd91b..0000000 --- a/db/migrate/20140304015553_create_server_settings.rb +++ /dev/null @@ -1,8 +0,0 @@ -class CreateServerSettings < ActiveRecord::Migration - def change - create_table :server_settings do |t| - - t.timestamps - end - end -end diff --git a/db/migrate/20140304015559_create_tournament_options.rb b/db/migrate/20140304015559_create_tournament_options.rb deleted file mode 100644 index d2df22e..0000000 --- a/db/migrate/20140304015559_create_tournament_options.rb +++ /dev/null @@ -1,8 +0,0 @@ -class CreateTournamentOptions < ActiveRecord::Migration - def change - create_table :tournament_options do |t| - - t.timestamps - end - end -end diff --git a/db/migrate/20140304015610_create_servers.rb b/db/migrate/20140304015610_create_servers.rb new file mode 100644 index 0000000..f33241a --- /dev/null +++ b/db/migrate/20140304015610_create_servers.rb @@ -0,0 +1,8 @@ +class CreateServers < ActiveRecord::Migration + def change + create_table :servers do |t| + + t.timestamps + end + end +end diff --git a/db/migrate/20140304015612_create_tournaments.rb b/db/migrate/20140304015612_create_tournaments.rb new file mode 100644 index 0000000..36fcf7e --- /dev/null +++ b/db/migrate/20140304015612_create_tournaments.rb @@ -0,0 +1,9 @@ +class CreateTournaments < ActiveRecord::Migration + def change + create_table :tournaments do |t| + t.references :game, index: true + + t.timestamps + end + end +end diff --git a/db/migrate/20140304015615_create_matches.rb b/db/migrate/20140304015615_create_matches.rb new file mode 100644 index 0000000..6c0c157 --- /dev/null +++ b/db/migrate/20140304015615_create_matches.rb @@ -0,0 +1,9 @@ +class CreateMatches < ActiveRecord::Migration + def change + create_table :matches do |t| + t.references :tournament, index: true + + t.timestamps + end + end +end diff --git a/db/migrate/20140304015617_create_teams.rb b/db/migrate/20140304015617_create_teams.rb new file mode 100644 index 0000000..dd8397d --- /dev/null +++ b/db/migrate/20140304015617_create_teams.rb @@ -0,0 +1,8 @@ +class CreateTeams < ActiveRecord::Migration + def change + create_table :teams do |t| + + t.timestamps + end + end +end diff --git a/db/migrate/20140304015622_create_users.rb b/db/migrate/20140304015622_create_users.rb new file mode 100644 index 0000000..f0986d4 --- /dev/null +++ b/db/migrate/20140304015622_create_users.rb @@ -0,0 +1,11 @@ +class CreateUsers < ActiveRecord::Migration + def change + create_table :users do |t| + t.string :name + t.string :email + t.string :user_name + + t.timestamps + end + end +end diff --git a/db/migrate/20140304015624_create_user_team_pairs.rb b/db/migrate/20140304015624_create_user_team_pairs.rb new file mode 100644 index 0000000..2c492ac --- /dev/null +++ b/db/migrate/20140304015624_create_user_team_pairs.rb @@ -0,0 +1,10 @@ +class CreateUserTeamPairs < ActiveRecord::Migration + def change + create_table :user_team_pairs do |t| + t.references :user, index: true + t.references :team, index: true + + t.timestamps + end + end +end diff --git a/db/migrate/20140304015626_create_team_match_pairs.rb b/db/migrate/20140304015626_create_team_match_pairs.rb new file mode 100644 index 0000000..8fac07e --- /dev/null +++ b/db/migrate/20140304015626_create_team_match_pairs.rb @@ -0,0 +1,10 @@ +class CreateTeamMatchPairs < ActiveRecord::Migration + def change + create_table :team_match_pairs do |t| + t.references :team, index: true + t.references :match, index: true + + t.timestamps + end + end +end diff --git a/db/migrate/20140304015628_create_alerts.rb b/db/migrate/20140304015628_create_alerts.rb new file mode 100644 index 0000000..68a8e10 --- /dev/null +++ b/db/migrate/20140304015628_create_alerts.rb @@ -0,0 +1,10 @@ +class CreateAlerts < ActiveRecord::Migration + def change + create_table :alerts do |t| + t.references :author, index: true + t.text :message + + t.timestamps + end + end +end diff --git a/db/migrate/20140304015631_create_pms.rb b/db/migrate/20140304015631_create_pms.rb new file mode 100644 index 0000000..93bb5c6 --- /dev/null +++ b/db/migrate/20140304015631_create_pms.rb @@ -0,0 +1,11 @@ +class CreatePms < ActiveRecord::Migration + def change + create_table :pms do |t| + t.references :author, index: true + t.references :recipient, index: true + t.text :message + + t.timestamps + end + end +end diff --git a/db/migrate/20140304015633_create_games.rb b/db/migrate/20140304015633_create_games.rb new file mode 100644 index 0000000..59d4ef0 --- /dev/null +++ b/db/migrate/20140304015633_create_games.rb @@ -0,0 +1,13 @@ +class CreateGames < ActiveRecord::Migration + def change + create_table :games do |t| + t.text :name + t.integer :players_per_team + t.integer :teams_per_match + t.integer :set_rounds + t.integer :randomized_teams + + t.timestamps + end + end +end diff --git a/db/migrate/20140304015635_create_game_attributes.rb b/db/migrate/20140304015635_create_game_attributes.rb new file mode 100644 index 0000000..b63f134 --- /dev/null +++ b/db/migrate/20140304015635_create_game_attributes.rb @@ -0,0 +1,11 @@ +class CreateGameAttributes < ActiveRecord::Migration + def change + create_table :game_attributes do |t| + t.references :game, index: true + t.text :key + t.integer :type + + t.timestamps + end + end +end diff --git a/db/migrate/20140304015638_create_server_settings.rb b/db/migrate/20140304015638_create_server_settings.rb new file mode 100644 index 0000000..dfdd91b --- /dev/null +++ b/db/migrate/20140304015638_create_server_settings.rb @@ -0,0 +1,8 @@ +class CreateServerSettings < ActiveRecord::Migration + def change + create_table :server_settings do |t| + + t.timestamps + end + end +end diff --git a/db/migrate/20140304015644_create_tournament_options.rb b/db/migrate/20140304015644_create_tournament_options.rb new file mode 100644 index 0000000..d2df22e --- /dev/null +++ b/db/migrate/20140304015644_create_tournament_options.rb @@ -0,0 +1,8 @@ +class CreateTournamentOptions < ActiveRecord::Migration + def change + create_table :tournament_options do |t| + + t.timestamps + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 7d4d50e..d44352e 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20140304015559) do +ActiveRecord::Schema.define(version: 20140304015644) do create_table "alerts", force: true do |t| t.integer "author_id" diff --git a/spec/controllers/alerts_controller_spec.rb b/spec/controllers/alerts_controller_spec.rb new file mode 100644 index 0000000..82b031b --- /dev/null +++ b/spec/controllers/alerts_controller_spec.rb @@ -0,0 +1,160 @@ +require 'spec_helper' + +# This spec was generated by rspec-rails when you ran the scaffold generator. +# It demonstrates how one might use RSpec to specify the controller code that +# was generated by Rails when you ran the scaffold generator. +# +# It assumes that the implementation code is generated by the rails scaffold +# generator. If you are using any extension libraries to generate different +# controller code, this generated spec may or may not pass. +# +# It only uses APIs available in rails and/or rspec-rails. There are a number +# of tools you can use to make these specs even more expressive, but we're +# sticking to rails and rspec-rails APIs to keep things simple and stable. +# +# Compared to earlier versions of this generator, there is very limited use of +# stubs and message expectations in this spec. Stubs are only used when there +# is no simpler way to get a handle on the object needed for the example. +# Message expectations are only used when there is no simpler way to specify +# that an instance is receiving a specific message. + +describe AlertsController do + + # This should return the minimal set of attributes required to create a valid + # Alert. As you add validations to Alert, be sure to + # adjust the attributes here as well. + let(:valid_attributes) { { "author" => "" } } + + # This should return the minimal set of values that should be in the session + # in order to pass any filters (e.g. authentication) defined in + # AlertsController. Be sure to keep this updated too. + let(:valid_session) { {} } + + describe "GET index" do + it "assigns all alerts as @alerts" do + alert = Alert.create! valid_attributes + get :index, {}, valid_session + assigns(:alerts).should eq([alert]) + end + end + + describe "GET show" do + it "assigns the requested alert as @alert" do + alert = Alert.create! valid_attributes + get :show, {:id => alert.to_param}, valid_session + assigns(:alert).should eq(alert) + end + end + + describe "GET new" do + it "assigns a new alert as @alert" do + get :new, {}, valid_session + assigns(:alert).should be_a_new(Alert) + end + end + + describe "GET edit" do + it "assigns the requested alert as @alert" do + alert = Alert.create! valid_attributes + get :edit, {:id => alert.to_param}, valid_session + assigns(:alert).should eq(alert) + end + end + + describe "POST create" do + describe "with valid params" do + it "creates a new Alert" do + expect { + post :create, {:alert => valid_attributes}, valid_session + }.to change(Alert, :count).by(1) + end + + it "assigns a newly created alert as @alert" do + post :create, {:alert => valid_attributes}, valid_session + assigns(:alert).should be_a(Alert) + assigns(:alert).should be_persisted + end + + it "redirects to the created alert" do + post :create, {:alert => valid_attributes}, valid_session + response.should redirect_to(Alert.last) + end + end + + describe "with invalid params" do + it "assigns a newly created but unsaved alert as @alert" do + # Trigger the behavior that occurs when invalid params are submitted + Alert.any_instance.stub(:save).and_return(false) + post :create, {:alert => { "author" => "invalid value" }}, valid_session + assigns(:alert).should be_a_new(Alert) + end + + it "re-renders the 'new' template" do + # Trigger the behavior that occurs when invalid params are submitted + Alert.any_instance.stub(:save).and_return(false) + post :create, {:alert => { "author" => "invalid value" }}, valid_session + response.should render_template("new") + end + end + end + + describe "PUT update" do + describe "with valid params" do + it "updates the requested alert" do + alert = Alert.create! valid_attributes + # Assuming there are no other alerts in the database, this + # specifies that the Alert created on the previous line + # receives the :update_attributes message with whatever params are + # submitted in the request. + Alert.any_instance.should_receive(:update).with({ "author" => "" }) + put :update, {:id => alert.to_param, :alert => { "author" => "" }}, valid_session + end + + it "assigns the requested alert as @alert" do + alert = Alert.create! valid_attributes + put :update, {:id => alert.to_param, :alert => valid_attributes}, valid_session + assigns(:alert).should eq(alert) + end + + it "redirects to the alert" do + alert = Alert.create! valid_attributes + put :update, {:id => alert.to_param, :alert => valid_attributes}, valid_session + response.should redirect_to(alert) + end + end + + describe "with invalid params" do + it "assigns the alert as @alert" do + alert = Alert.create! valid_attributes + # Trigger the behavior that occurs when invalid params are submitted + Alert.any_instance.stub(:save).and_return(false) + put :update, {:id => alert.to_param, :alert => { "author" => "invalid value" }}, valid_session + assigns(:alert).should eq(alert) + end + + it "re-renders the 'edit' template" do + alert = Alert.create! valid_attributes + # Trigger the behavior that occurs when invalid params are submitted + Alert.any_instance.stub(:save).and_return(false) + put :update, {:id => alert.to_param, :alert => { "author" => "invalid value" }}, valid_session + response.should render_template("edit") + end + end + end + + describe "DELETE destroy" do + it "destroys the requested alert" do + alert = Alert.create! valid_attributes + expect { + delete :destroy, {:id => alert.to_param}, valid_session + }.to change(Alert, :count).by(-1) + end + + it "redirects to the alerts list" do + alert = Alert.create! valid_attributes + delete :destroy, {:id => alert.to_param}, valid_session + response.should redirect_to(alerts_url) + end + end + +end diff --git a/spec/controllers/games_controller_spec.rb b/spec/controllers/games_controller_spec.rb new file mode 100644 index 0000000..ab8b6b2 --- /dev/null +++ b/spec/controllers/games_controller_spec.rb @@ -0,0 +1,160 @@ +require 'spec_helper' + +# This spec was generated by rspec-rails when you ran the scaffold generator. +# It demonstrates how one might use RSpec to specify the controller code that +# was generated by Rails when you ran the scaffold generator. +# +# It assumes that the implementation code is generated by the rails scaffold +# generator. If you are using any extension libraries to generate different +# controller code, this generated spec may or may not pass. +# +# It only uses APIs available in rails and/or rspec-rails. There are a number +# of tools you can use to make these specs even more expressive, but we're +# sticking to rails and rspec-rails APIs to keep things simple and stable. +# +# Compared to earlier versions of this generator, there is very limited use of +# stubs and message expectations in this spec. Stubs are only used when there +# is no simpler way to get a handle on the object needed for the example. +# Message expectations are only used when there is no simpler way to specify +# that an instance is receiving a specific message. + +describe GamesController do + + # This should return the minimal set of attributes required to create a valid + # Game. As you add validations to Game, be sure to + # adjust the attributes here as well. + let(:valid_attributes) { { "name" => "MyText" } } + + # This should return the minimal set of values that should be in the session + # in order to pass any filters (e.g. authentication) defined in + # GamesController. Be sure to keep this updated too. + let(:valid_session) { {} } + + describe "GET index" do + it "assigns all games as @games" do + game = Game.create! valid_attributes + get :index, {}, valid_session + assigns(:games).should eq([game]) + end + end + + describe "GET show" do + it "assigns the requested game as @game" do + game = Game.create! valid_attributes + get :show, {:id => game.to_param}, valid_session + assigns(:game).should eq(game) + end + end + + describe "GET new" do + it "assigns a new game as @game" do + get :new, {}, valid_session + assigns(:game).should be_a_new(Game) + end + end + + describe "GET edit" do + it "assigns the requested game as @game" do + game = Game.create! valid_attributes + get :edit, {:id => game.to_param}, valid_session + assigns(:game).should eq(game) + end + end + + describe "POST create" do + describe "with valid params" do + it "creates a new Game" do + expect { + post :create, {:game => valid_attributes}, valid_session + }.to change(Game, :count).by(1) + end + + it "assigns a newly created game as @game" do + post :create, {:game => valid_attributes}, valid_session + assigns(:game).should be_a(Game) + assigns(:game).should be_persisted + end + + it "redirects to the created game" do + post :create, {:game => valid_attributes}, valid_session + response.should redirect_to(Game.last) + end + end + + describe "with invalid params" do + it "assigns a newly created but unsaved game as @game" do + # Trigger the behavior that occurs when invalid params are submitted + Game.any_instance.stub(:save).and_return(false) + post :create, {:game => { "name" => "invalid value" }}, valid_session + assigns(:game).should be_a_new(Game) + end + + it "re-renders the 'new' template" do + # Trigger the behavior that occurs when invalid params are submitted + Game.any_instance.stub(:save).and_return(false) + post :create, {:game => { "name" => "invalid value" }}, valid_session + response.should render_template("new") + end + end + end + + describe "PUT update" do + describe "with valid params" do + it "updates the requested game" do + game = Game.create! valid_attributes + # Assuming there are no other games in the database, this + # specifies that the Game created on the previous line + # receives the :update_attributes message with whatever params are + # submitted in the request. + Game.any_instance.should_receive(:update).with({ "name" => "MyText" }) + put :update, {:id => game.to_param, :game => { "name" => "MyText" }}, valid_session + end + + it "assigns the requested game as @game" do + game = Game.create! valid_attributes + put :update, {:id => game.to_param, :game => valid_attributes}, valid_session + assigns(:game).should eq(game) + end + + it "redirects to the game" do + game = Game.create! valid_attributes + put :update, {:id => game.to_param, :game => valid_attributes}, valid_session + response.should redirect_to(game) + end + end + + describe "with invalid params" do + it "assigns the game as @game" do + game = Game.create! valid_attributes + # Trigger the behavior that occurs when invalid params are submitted + Game.any_instance.stub(:save).and_return(false) + put :update, {:id => game.to_param, :game => { "name" => "invalid value" }}, valid_session + assigns(:game).should eq(game) + end + + it "re-renders the 'edit' template" do + game = Game.create! valid_attributes + # Trigger the behavior that occurs when invalid params are submitted + Game.any_instance.stub(:save).and_return(false) + put :update, {:id => game.to_param, :game => { "name" => "invalid value" }}, valid_session + response.should render_template("edit") + end + end + end + + describe "DELETE destroy" do + it "destroys the requested game" do + game = Game.create! valid_attributes + expect { + delete :destroy, {:id => game.to_param}, valid_session + }.to change(Game, :count).by(-1) + end + + it "redirects to the games list" do + game = Game.create! valid_attributes + delete :destroy, {:id => game.to_param}, valid_session + response.should redirect_to(games_url) + end + end + +end diff --git a/spec/controllers/main_controller_spec.rb b/spec/controllers/main_controller_spec.rb new file mode 100644 index 0000000..247e21d --- /dev/null +++ b/spec/controllers/main_controller_spec.rb @@ -0,0 +1,5 @@ +require 'spec_helper' + +describe MainController do + +end diff --git a/spec/controllers/matches_controller_spec.rb b/spec/controllers/matches_controller_spec.rb new file mode 100644 index 0000000..1f7adf8 --- /dev/null +++ b/spec/controllers/matches_controller_spec.rb @@ -0,0 +1,160 @@ +require 'spec_helper' + +# This spec was generated by rspec-rails when you ran the scaffold generator. +# It demonstrates how one might use RSpec to specify the controller code that +# was generated by Rails when you ran the scaffold generator. +# +# It assumes that the implementation code is generated by the rails scaffold +# generator. If you are using any extension libraries to generate different +# controller code, this generated spec may or may not pass. +# +# It only uses APIs available in rails and/or rspec-rails. There are a number +# of tools you can use to make these specs even more expressive, but we're +# sticking to rails and rspec-rails APIs to keep things simple and stable. +# +# Compared to earlier versions of this generator, there is very limited use of +# stubs and message expectations in this spec. Stubs are only used when there +# is no simpler way to get a handle on the object needed for the example. +# Message expectations are only used when there is no simpler way to specify +# that an instance is receiving a specific message. + +describe MatchesController do + + # This should return the minimal set of attributes required to create a valid + # Match. As you add validations to Match, be sure to + # adjust the attributes here as well. + let(:valid_attributes) { { "tournament" => "" } } + + # This should return the minimal set of values that should be in the session + # in order to pass any filters (e.g. authentication) defined in + # MatchesController. Be sure to keep this updated too. + let(:valid_session) { {} } + + describe "GET index" do + it "assigns all matches as @matches" do + match = Match.create! valid_attributes + get :index, {}, valid_session + assigns(:matches).should eq([match]) + end + end + + describe "GET show" do + it "assigns the requested match as @match" do + match = Match.create! valid_attributes + get :show, {:id => match.to_param}, valid_session + assigns(:match).should eq(match) + end + end + + describe "GET new" do + it "assigns a new match as @match" do + get :new, {}, valid_session + assigns(:match).should be_a_new(Match) + end + end + + describe "GET edit" do + it "assigns the requested match as @match" do + match = Match.create! valid_attributes + get :edit, {:id => match.to_param}, valid_session + assigns(:match).should eq(match) + end + end + + describe "POST create" do + describe "with valid params" do + it "creates a new Match" do + expect { + post :create, {:match => valid_attributes}, valid_session + }.to change(Match, :count).by(1) + end + + it "assigns a newly created match as @match" do + post :create, {:match => valid_attributes}, valid_session + assigns(:match).should be_a(Match) + assigns(:match).should be_persisted + end + + it "redirects to the created match" do + post :create, {:match => valid_attributes}, valid_session + response.should redirect_to(Match.last) + end + end + + describe "with invalid params" do + it "assigns a newly created but unsaved match as @match" do + # Trigger the behavior that occurs when invalid params are submitted + Match.any_instance.stub(:save).and_return(false) + post :create, {:match => { "tournament" => "invalid value" }}, valid_session + assigns(:match).should be_a_new(Match) + end + + it "re-renders the 'new' template" do + # Trigger the behavior that occurs when invalid params are submitted + Match.any_instance.stub(:save).and_return(false) + post :create, {:match => { "tournament" => "invalid value" }}, valid_session + response.should render_template("new") + end + end + end + + describe "PUT update" do + describe "with valid params" do + it "updates the requested match" do + match = Match.create! valid_attributes + # Assuming there are no other matches in the database, this + # specifies that the Match created on the previous line + # receives the :update_attributes message with whatever params are + # submitted in the request. + Match.any_instance.should_receive(:update).with({ "tournament" => "" }) + put :update, {:id => match.to_param, :match => { "tournament" => "" }}, valid_session + end + + it "assigns the requested match as @match" do + match = Match.create! valid_attributes + put :update, {:id => match.to_param, :match => valid_attributes}, valid_session + assigns(:match).should eq(match) + end + + it "redirects to the match" do + match = Match.create! valid_attributes + put :update, {:id => match.to_param, :match => valid_attributes}, valid_session + response.should redirect_to(match) + end + end + + describe "with invalid params" do + it "assigns the match as @match" do + match = Match.create! valid_attributes + # Trigger the behavior that occurs when invalid params are submitted + Match.any_instance.stub(:save).and_return(false) + put :update, {:id => match.to_param, :match => { "tournament" => "invalid value" }}, valid_session + assigns(:match).should eq(match) + end + + it "re-renders the 'edit' template" do + match = Match.create! valid_attributes + # Trigger the behavior that occurs when invalid params are submitted + Match.any_instance.stub(:save).and_return(false) + put :update, {:id => match.to_param, :match => { "tournament" => "invalid value" }}, valid_session + response.should render_template("edit") + end + end + end + + describe "DELETE destroy" do + it "destroys the requested match" do + match = Match.create! valid_attributes + expect { + delete :destroy, {:id => match.to_param}, valid_session + }.to change(Match, :count).by(-1) + end + + it "redirects to the matches list" do + match = Match.create! valid_attributes + delete :destroy, {:id => match.to_param}, valid_session + response.should redirect_to(matches_url) + end + end + +end diff --git a/spec/controllers/pms_controller_spec.rb b/spec/controllers/pms_controller_spec.rb new file mode 100644 index 0000000..f0822db --- /dev/null +++ b/spec/controllers/pms_controller_spec.rb @@ -0,0 +1,160 @@ +require 'spec_helper' + +# This spec was generated by rspec-rails when you ran the scaffold generator. +# It demonstrates how one might use RSpec to specify the controller code that +# was generated by Rails when you ran the scaffold generator. +# +# It assumes that the implementation code is generated by the rails scaffold +# generator. If you are using any extension libraries to generate different +# controller code, this generated spec may or may not pass. +# +# It only uses APIs available in rails and/or rspec-rails. There are a number +# of tools you can use to make these specs even more expressive, but we're +# sticking to rails and rspec-rails APIs to keep things simple and stable. +# +# Compared to earlier versions of this generator, there is very limited use of +# stubs and message expectations in this spec. Stubs are only used when there +# is no simpler way to get a handle on the object needed for the example. +# Message expectations are only used when there is no simpler way to specify +# that an instance is receiving a specific message. + +describe PmsController do + + # This should return the minimal set of attributes required to create a valid + # Pm. As you add validations to Pm, be sure to + # adjust the attributes here as well. + let(:valid_attributes) { { "author" => "" } } + + # This should return the minimal set of values that should be in the session + # in order to pass any filters (e.g. authentication) defined in + # PmsController. Be sure to keep this updated too. + let(:valid_session) { {} } + + describe "GET index" do + it "assigns all pms as @pms" do + pm = Pm.create! valid_attributes + get :index, {}, valid_session + assigns(:pms).should eq([pm]) + end + end + + describe "GET show" do + it "assigns the requested pm as @pm" do + pm = Pm.create! valid_attributes + get :show, {:id => pm.to_param}, valid_session + assigns(:pm).should eq(pm) + end + end + + describe "GET new" do + it "assigns a new pm as @pm" do + get :new, {}, valid_session + assigns(:pm).should be_a_new(Pm) + end + end + + describe "GET edit" do + it "assigns the requested pm as @pm" do + pm = Pm.create! valid_attributes + get :edit, {:id => pm.to_param}, valid_session + assigns(:pm).should eq(pm) + end + end + + describe "POST create" do + describe "with valid params" do + it "creates a new Pm" do + expect { + post :create, {:pm => valid_attributes}, valid_session + }.to change(Pm, :count).by(1) + end + + it "assigns a newly created pm as @pm" do + post :create, {:pm => valid_attributes}, valid_session + assigns(:pm).should be_a(Pm) + assigns(:pm).should be_persisted + end + + it "redirects to the created pm" do + post :create, {:pm => valid_attributes}, valid_session + response.should redirect_to(Pm.last) + end + end + + describe "with invalid params" do + it "assigns a newly created but unsaved pm as @pm" do + # Trigger the behavior that occurs when invalid params are submitted + Pm.any_instance.stub(:save).and_return(false) + post :create, {:pm => { "author" => "invalid value" }}, valid_session + assigns(:pm).should be_a_new(Pm) + end + + it "re-renders the 'new' template" do + # Trigger the behavior that occurs when invalid params are submitted + Pm.any_instance.stub(:save).and_return(false) + post :create, {:pm => { "author" => "invalid value" }}, valid_session + response.should render_template("new") + end + end + end + + describe "PUT update" do + describe "with valid params" do + it "updates the requested pm" do + pm = Pm.create! valid_attributes + # Assuming there are no other pms in the database, this + # specifies that the Pm created on the previous line + # receives the :update_attributes message with whatever params are + # submitted in the request. + Pm.any_instance.should_receive(:update).with({ "author" => "" }) + put :update, {:id => pm.to_param, :pm => { "author" => "" }}, valid_session + end + + it "assigns the requested pm as @pm" do + pm = Pm.create! valid_attributes + put :update, {:id => pm.to_param, :pm => valid_attributes}, valid_session + assigns(:pm).should eq(pm) + end + + it "redirects to the pm" do + pm = Pm.create! valid_attributes + put :update, {:id => pm.to_param, :pm => valid_attributes}, valid_session + response.should redirect_to(pm) + end + end + + describe "with invalid params" do + it "assigns the pm as @pm" do + pm = Pm.create! valid_attributes + # Trigger the behavior that occurs when invalid params are submitted + Pm.any_instance.stub(:save).and_return(false) + put :update, {:id => pm.to_param, :pm => { "author" => "invalid value" }}, valid_session + assigns(:pm).should eq(pm) + end + + it "re-renders the 'edit' template" do + pm = Pm.create! valid_attributes + # Trigger the behavior that occurs when invalid params are submitted + Pm.any_instance.stub(:save).and_return(false) + put :update, {:id => pm.to_param, :pm => { "author" => "invalid value" }}, valid_session + response.should render_template("edit") + end + end + end + + describe "DELETE destroy" do + it "destroys the requested pm" do + pm = Pm.create! valid_attributes + expect { + delete :destroy, {:id => pm.to_param}, valid_session + }.to change(Pm, :count).by(-1) + end + + it "redirects to the pms list" do + pm = Pm.create! valid_attributes + delete :destroy, {:id => pm.to_param}, valid_session + response.should redirect_to(pms_url) + end + end + +end diff --git a/spec/controllers/search_controller_spec.rb b/spec/controllers/search_controller_spec.rb new file mode 100644 index 0000000..73248fb --- /dev/null +++ b/spec/controllers/search_controller_spec.rb @@ -0,0 +1,5 @@ +require 'spec_helper' + +describe SearchController do + +end diff --git a/spec/controllers/servers_controller_spec.rb b/spec/controllers/servers_controller_spec.rb new file mode 100644 index 0000000..c6f4fa6 --- /dev/null +++ b/spec/controllers/servers_controller_spec.rb @@ -0,0 +1,160 @@ +require 'spec_helper' + +# This spec was generated by rspec-rails when you ran the scaffold generator. +# It demonstrates how one might use RSpec to specify the controller code that +# was generated by Rails when you ran the scaffold generator. +# +# It assumes that the implementation code is generated by the rails scaffold +# generator. If you are using any extension libraries to generate different +# controller code, this generated spec may or may not pass. +# +# It only uses APIs available in rails and/or rspec-rails. There are a number +# of tools you can use to make these specs even more expressive, but we're +# sticking to rails and rspec-rails APIs to keep things simple and stable. +# +# Compared to earlier versions of this generator, there is very limited use of +# stubs and message expectations in this spec. Stubs are only used when there +# is no simpler way to get a handle on the object needed for the example. +# Message expectations are only used when there is no simpler way to specify +# that an instance is receiving a specific message. + +describe ServersController do + + # This should return the minimal set of attributes required to create a valid + # Server. As you add validations to Server, be sure to + # adjust the attributes here as well. + let(:valid_attributes) { { } } + + # This should return the minimal set of values that should be in the session + # in order to pass any filters (e.g. authentication) defined in + # ServersController. Be sure to keep this updated too. + let(:valid_session) { {} } + + describe "GET index" do + it "assigns all servers as @servers" do + server = Server.create! valid_attributes + get :index, {}, valid_session + assigns(:servers).should eq([server]) + end + end + + describe "GET show" do + it "assigns the requested server as @server" do + server = Server.create! valid_attributes + get :show, {:id => server.to_param}, valid_session + assigns(:server).should eq(server) + end + end + + describe "GET new" do + it "assigns a new server as @server" do + get :new, {}, valid_session + assigns(:server).should be_a_new(Server) + end + end + + describe "GET edit" do + it "assigns the requested server as @server" do + server = Server.create! valid_attributes + get :edit, {:id => server.to_param}, valid_session + assigns(:server).should eq(server) + end + end + + describe "POST create" do + describe "with valid params" do + it "creates a new Server" do + expect { + post :create, {:server => valid_attributes}, valid_session + }.to change(Server, :count).by(1) + end + + it "assigns a newly created server as @server" do + post :create, {:server => valid_attributes}, valid_session + assigns(:server).should be_a(Server) + assigns(:server).should be_persisted + end + + it "redirects to the created server" do + post :create, {:server => valid_attributes}, valid_session + response.should redirect_to(Server.last) + end + end + + describe "with invalid params" do + it "assigns a newly created but unsaved server as @server" do + # Trigger the behavior that occurs when invalid params are submitted + Server.any_instance.stub(:save).and_return(false) + post :create, {:server => { }}, valid_session + assigns(:server).should be_a_new(Server) + end + + it "re-renders the 'new' template" do + # Trigger the behavior that occurs when invalid params are submitted + Server.any_instance.stub(:save).and_return(false) + post :create, {:server => { }}, valid_session + response.should render_template("new") + end + end + end + + describe "PUT update" do + describe "with valid params" do + it "updates the requested server" do + server = Server.create! valid_attributes + # Assuming there are no other servers in the database, this + # specifies that the Server created on the previous line + # receives the :update_attributes message with whatever params are + # submitted in the request. + Server.any_instance.should_receive(:update).with({ "these" => "params" }) + put :update, {:id => server.to_param, :server => { "these" => "params" }}, valid_session + end + + it "assigns the requested server as @server" do + server = Server.create! valid_attributes + put :update, {:id => server.to_param, :server => valid_attributes}, valid_session + assigns(:server).should eq(server) + end + + it "redirects to the server" do + server = Server.create! valid_attributes + put :update, {:id => server.to_param, :server => valid_attributes}, valid_session + response.should redirect_to(server) + end + end + + describe "with invalid params" do + it "assigns the server as @server" do + server = Server.create! valid_attributes + # Trigger the behavior that occurs when invalid params are submitted + Server.any_instance.stub(:save).and_return(false) + put :update, {:id => server.to_param, :server => { }}, valid_session + assigns(:server).should eq(server) + end + + it "re-renders the 'edit' template" do + server = Server.create! valid_attributes + # Trigger the behavior that occurs when invalid params are submitted + Server.any_instance.stub(:save).and_return(false) + put :update, {:id => server.to_param, :server => { }}, valid_session + response.should render_template("edit") + end + end + end + + describe "DELETE destroy" do + it "destroys the requested server" do + server = Server.create! valid_attributes + expect { + delete :destroy, {:id => server.to_param}, valid_session + }.to change(Server, :count).by(-1) + end + + it "redirects to the servers list" do + server = Server.create! valid_attributes + delete :destroy, {:id => server.to_param}, valid_session + response.should redirect_to(servers_url) + end + end + +end diff --git a/spec/controllers/teams_controller_spec.rb b/spec/controllers/teams_controller_spec.rb new file mode 100644 index 0000000..9c74d89 --- /dev/null +++ b/spec/controllers/teams_controller_spec.rb @@ -0,0 +1,160 @@ +require 'spec_helper' + +# This spec was generated by rspec-rails when you ran the scaffold generator. +# It demonstrates how one might use RSpec to specify the controller code that +# was generated by Rails when you ran the scaffold generator. +# +# It assumes that the implementation code is generated by the rails scaffold +# generator. If you are using any extension libraries to generate different +# controller code, this generated spec may or may not pass. +# +# It only uses APIs available in rails and/or rspec-rails. There are a number +# of tools you can use to make these specs even more expressive, but we're +# sticking to rails and rspec-rails APIs to keep things simple and stable. +# +# Compared to earlier versions of this generator, there is very limited use of +# stubs and message expectations in this spec. Stubs are only used when there +# is no simpler way to get a handle on the object needed for the example. +# Message expectations are only used when there is no simpler way to specify +# that an instance is receiving a specific message. + +describe TeamsController do + + # This should return the minimal set of attributes required to create a valid + # Team. As you add validations to Team, be sure to + # adjust the attributes here as well. + let(:valid_attributes) { { } } + + # This should return the minimal set of values that should be in the session + # in order to pass any filters (e.g. authentication) defined in + # TeamsController. Be sure to keep this updated too. + let(:valid_session) { {} } + + describe "GET index" do + it "assigns all teams as @teams" do + team = Team.create! valid_attributes + get :index, {}, valid_session + assigns(:teams).should eq([team]) + end + end + + describe "GET show" do + it "assigns the requested team as @team" do + team = Team.create! valid_attributes + get :show, {:id => team.to_param}, valid_session + assigns(:team).should eq(team) + end + end + + describe "GET new" do + it "assigns a new team as @team" do + get :new, {}, valid_session + assigns(:team).should be_a_new(Team) + end + end + + describe "GET edit" do + it "assigns the requested team as @team" do + team = Team.create! valid_attributes + get :edit, {:id => team.to_param}, valid_session + assigns(:team).should eq(team) + end + end + + describe "POST create" do + describe "with valid params" do + it "creates a new Team" do + expect { + post :create, {:team => valid_attributes}, valid_session + }.to change(Team, :count).by(1) + end + + it "assigns a newly created team as @team" do + post :create, {:team => valid_attributes}, valid_session + assigns(:team).should be_a(Team) + assigns(:team).should be_persisted + end + + it "redirects to the created team" do + post :create, {:team => valid_attributes}, valid_session + response.should redirect_to(Team.last) + end + end + + describe "with invalid params" do + it "assigns a newly created but unsaved team as @team" do + # Trigger the behavior that occurs when invalid params are submitted + Team.any_instance.stub(:save).and_return(false) + post :create, {:team => { }}, valid_session + assigns(:team).should be_a_new(Team) + end + + it "re-renders the 'new' template" do + # Trigger the behavior that occurs when invalid params are submitted + Team.any_instance.stub(:save).and_return(false) + post :create, {:team => { }}, valid_session + response.should render_template("new") + end + end + end + + describe "PUT update" do + describe "with valid params" do + it "updates the requested team" do + team = Team.create! valid_attributes + # Assuming there are no other teams in the database, this + # specifies that the Team created on the previous line + # receives the :update_attributes message with whatever params are + # submitted in the request. + Team.any_instance.should_receive(:update).with({ "these" => "params" }) + put :update, {:id => team.to_param, :team => { "these" => "params" }}, valid_session + end + + it "assigns the requested team as @team" do + team = Team.create! valid_attributes + put :update, {:id => team.to_param, :team => valid_attributes}, valid_session + assigns(:team).should eq(team) + end + + it "redirects to the team" do + team = Team.create! valid_attributes + put :update, {:id => team.to_param, :team => valid_attributes}, valid_session + response.should redirect_to(team) + end + end + + describe "with invalid params" do + it "assigns the team as @team" do + team = Team.create! valid_attributes + # Trigger the behavior that occurs when invalid params are submitted + Team.any_instance.stub(:save).and_return(false) + put :update, {:id => team.to_param, :team => { }}, valid_session + assigns(:team).should eq(team) + end + + it "re-renders the 'edit' template" do + team = Team.create! valid_attributes + # Trigger the behavior that occurs when invalid params are submitted + Team.any_instance.stub(:save).and_return(false) + put :update, {:id => team.to_param, :team => { }}, valid_session + response.should render_template("edit") + end + end + end + + describe "DELETE destroy" do + it "destroys the requested team" do + team = Team.create! valid_attributes + expect { + delete :destroy, {:id => team.to_param}, valid_session + }.to change(Team, :count).by(-1) + end + + it "redirects to the teams list" do + team = Team.create! valid_attributes + delete :destroy, {:id => team.to_param}, valid_session + response.should redirect_to(teams_url) + end + end + +end diff --git a/spec/controllers/tournaments_controller_spec.rb b/spec/controllers/tournaments_controller_spec.rb new file mode 100644 index 0000000..f7b6e19 --- /dev/null +++ b/spec/controllers/tournaments_controller_spec.rb @@ -0,0 +1,160 @@ +require 'spec_helper' + +# This spec was generated by rspec-rails when you ran the scaffold generator. +# It demonstrates how one might use RSpec to specify the controller code that +# was generated by Rails when you ran the scaffold generator. +# +# It assumes that the implementation code is generated by the rails scaffold +# generator. If you are using any extension libraries to generate different +# controller code, this generated spec may or may not pass. +# +# It only uses APIs available in rails and/or rspec-rails. There are a number +# of tools you can use to make these specs even more expressive, but we're +# sticking to rails and rspec-rails APIs to keep things simple and stable. +# +# Compared to earlier versions of this generator, there is very limited use of +# stubs and message expectations in this spec. Stubs are only used when there +# is no simpler way to get a handle on the object needed for the example. +# Message expectations are only used when there is no simpler way to specify +# that an instance is receiving a specific message. + +describe TournamentsController do + + # This should return the minimal set of attributes required to create a valid + # Tournament. As you add validations to Tournament, be sure to + # adjust the attributes here as well. + let(:valid_attributes) { { "game" => "" } } + + # This should return the minimal set of values that should be in the session + # in order to pass any filters (e.g. authentication) defined in + # TournamentsController. Be sure to keep this updated too. + let(:valid_session) { {} } + + describe "GET index" do + it "assigns all tournaments as @tournaments" do + tournament = Tournament.create! valid_attributes + get :index, {}, valid_session + assigns(:tournaments).should eq([tournament]) + end + end + + describe "GET show" do + it "assigns the requested tournament as @tournament" do + tournament = Tournament.create! valid_attributes + get :show, {:id => tournament.to_param}, valid_session + assigns(:tournament).should eq(tournament) + end + end + + describe "GET new" do + it "assigns a new tournament as @tournament" do + get :new, {}, valid_session + assigns(:tournament).should be_a_new(Tournament) + end + end + + describe "GET edit" do + it "assigns the requested tournament as @tournament" do + tournament = Tournament.create! valid_attributes + get :edit, {:id => tournament.to_param}, valid_session + assigns(:tournament).should eq(tournament) + end + end + + describe "POST create" do + describe "with valid params" do + it "creates a new Tournament" do + expect { + post :create, {:tournament => valid_attributes}, valid_session + }.to change(Tournament, :count).by(1) + end + + it "assigns a newly created tournament as @tournament" do + post :create, {:tournament => valid_attributes}, valid_session + assigns(:tournament).should be_a(Tournament) + assigns(:tournament).should be_persisted + end + + it "redirects to the created tournament" do + post :create, {:tournament => valid_attributes}, valid_session + response.should redirect_to(Tournament.last) + end + end + + describe "with invalid params" do + it "assigns a newly created but unsaved tournament as @tournament" do + # Trigger the behavior that occurs when invalid params are submitted + Tournament.any_instance.stub(:save).and_return(false) + post :create, {:tournament => { "game" => "invalid value" }}, valid_session + assigns(:tournament).should be_a_new(Tournament) + end + + it "re-renders the 'new' template" do + # Trigger the behavior that occurs when invalid params are submitted + Tournament.any_instance.stub(:save).and_return(false) + post :create, {:tournament => { "game" => "invalid value" }}, valid_session + response.should render_template("new") + end + end + end + + describe "PUT update" do + describe "with valid params" do + it "updates the requested tournament" do + tournament = Tournament.create! valid_attributes + # Assuming there are no other tournaments in the database, this + # specifies that the Tournament created on the previous line + # receives the :update_attributes message with whatever params are + # submitted in the request. + Tournament.any_instance.should_receive(:update).with({ "game" => "" }) + put :update, {:id => tournament.to_param, :tournament => { "game" => "" }}, valid_session + end + + it "assigns the requested tournament as @tournament" do + tournament = Tournament.create! valid_attributes + put :update, {:id => tournament.to_param, :tournament => valid_attributes}, valid_session + assigns(:tournament).should eq(tournament) + end + + it "redirects to the tournament" do + tournament = Tournament.create! valid_attributes + put :update, {:id => tournament.to_param, :tournament => valid_attributes}, valid_session + response.should redirect_to(tournament) + end + end + + describe "with invalid params" do + it "assigns the tournament as @tournament" do + tournament = Tournament.create! valid_attributes + # Trigger the behavior that occurs when invalid params are submitted + Tournament.any_instance.stub(:save).and_return(false) + put :update, {:id => tournament.to_param, :tournament => { "game" => "invalid value" }}, valid_session + assigns(:tournament).should eq(tournament) + end + + it "re-renders the 'edit' template" do + tournament = Tournament.create! valid_attributes + # Trigger the behavior that occurs when invalid params are submitted + Tournament.any_instance.stub(:save).and_return(false) + put :update, {:id => tournament.to_param, :tournament => { "game" => "invalid value" }}, valid_session + response.should render_template("edit") + end + end + end + + describe "DELETE destroy" do + it "destroys the requested tournament" do + tournament = Tournament.create! valid_attributes + expect { + delete :destroy, {:id => tournament.to_param}, valid_session + }.to change(Tournament, :count).by(-1) + end + + it "redirects to the tournaments list" do + tournament = Tournament.create! valid_attributes + delete :destroy, {:id => tournament.to_param}, valid_session + response.should redirect_to(tournaments_url) + end + end + +end diff --git a/spec/controllers/users_controller_spec.rb b/spec/controllers/users_controller_spec.rb new file mode 100644 index 0000000..142455c --- /dev/null +++ b/spec/controllers/users_controller_spec.rb @@ -0,0 +1,5 @@ +require 'spec_helper' + +describe UsersController do + +end diff --git a/spec/helpers/alerts_helper_spec.rb b/spec/helpers/alerts_helper_spec.rb new file mode 100644 index 0000000..812e415 --- /dev/null +++ b/spec/helpers/alerts_helper_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +# Specs in this file have access to a helper object that includes +# the AlertsHelper. For example: +# +# describe AlertsHelper do +# describe "string concat" do +# it "concats two strings with spaces" do +# helper.concat_strings("this","that").should == "this that" +# end +# end +# end +describe AlertsHelper do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/helpers/games_helper_spec.rb b/spec/helpers/games_helper_spec.rb new file mode 100644 index 0000000..72addeb --- /dev/null +++ b/spec/helpers/games_helper_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +# Specs in this file have access to a helper object that includes +# the GamesHelper. For example: +# +# describe GamesHelper do +# describe "string concat" do +# it "concats two strings with spaces" do +# helper.concat_strings("this","that").should == "this that" +# end +# end +# end +describe GamesHelper do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/helpers/main_helper_spec.rb b/spec/helpers/main_helper_spec.rb new file mode 100644 index 0000000..9d316c5 --- /dev/null +++ b/spec/helpers/main_helper_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +# Specs in this file have access to a helper object that includes +# the MainHelper. For example: +# +# describe MainHelper do +# describe "string concat" do +# it "concats two strings with spaces" do +# helper.concat_strings("this","that").should == "this that" +# end +# end +# end +describe MainHelper do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/helpers/matches_helper_spec.rb b/spec/helpers/matches_helper_spec.rb new file mode 100644 index 0000000..271cd00 --- /dev/null +++ b/spec/helpers/matches_helper_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +# Specs in this file have access to a helper object that includes +# the MatchesHelper. For example: +# +# describe MatchesHelper do +# describe "string concat" do +# it "concats two strings with spaces" do +# helper.concat_strings("this","that").should == "this that" +# end +# end +# end +describe MatchesHelper do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/helpers/pms_helper_spec.rb b/spec/helpers/pms_helper_spec.rb new file mode 100644 index 0000000..5ebf709 --- /dev/null +++ b/spec/helpers/pms_helper_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +# Specs in this file have access to a helper object that includes +# the PmsHelper. For example: +# +# describe PmsHelper do +# describe "string concat" do +# it "concats two strings with spaces" do +# helper.concat_strings("this","that").should == "this that" +# end +# end +# end +describe PmsHelper do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/helpers/search_helper_spec.rb b/spec/helpers/search_helper_spec.rb new file mode 100644 index 0000000..fabfe99 --- /dev/null +++ b/spec/helpers/search_helper_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +# Specs in this file have access to a helper object that includes +# the SearchHelper. For example: +# +# describe SearchHelper do +# describe "string concat" do +# it "concats two strings with spaces" do +# helper.concat_strings("this","that").should == "this that" +# end +# end +# end +describe SearchHelper do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/helpers/servers_helper_spec.rb b/spec/helpers/servers_helper_spec.rb new file mode 100644 index 0000000..487d1e4 --- /dev/null +++ b/spec/helpers/servers_helper_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +# Specs in this file have access to a helper object that includes +# the ServersHelper. For example: +# +# describe ServersHelper do +# describe "string concat" do +# it "concats two strings with spaces" do +# helper.concat_strings("this","that").should == "this that" +# end +# end +# end +describe ServersHelper do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/helpers/teams_helper_spec.rb b/spec/helpers/teams_helper_spec.rb new file mode 100644 index 0000000..9572616 --- /dev/null +++ b/spec/helpers/teams_helper_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +# Specs in this file have access to a helper object that includes +# the TeamsHelper. For example: +# +# describe TeamsHelper do +# describe "string concat" do +# it "concats two strings with spaces" do +# helper.concat_strings("this","that").should == "this that" +# end +# end +# end +describe TeamsHelper do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/helpers/tournaments_helper_spec.rb b/spec/helpers/tournaments_helper_spec.rb new file mode 100644 index 0000000..c7eb224 --- /dev/null +++ b/spec/helpers/tournaments_helper_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +# Specs in this file have access to a helper object that includes +# the TournamentsHelper. For example: +# +# describe TournamentsHelper do +# describe "string concat" do +# it "concats two strings with spaces" do +# helper.concat_strings("this","that").should == "this that" +# end +# end +# end +describe TournamentsHelper do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/helpers/users_helper_spec.rb b/spec/helpers/users_helper_spec.rb new file mode 100644 index 0000000..e65fff9 --- /dev/null +++ b/spec/helpers/users_helper_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +# Specs in this file have access to a helper object that includes +# the UsersHelper. For example: +# +# describe UsersHelper do +# describe "string concat" do +# it "concats two strings with spaces" do +# helper.concat_strings("this","that").should == "this that" +# end +# end +# end +describe UsersHelper do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/models/alert_spec.rb b/spec/models/alert_spec.rb new file mode 100644 index 0000000..d7fa4af --- /dev/null +++ b/spec/models/alert_spec.rb @@ -0,0 +1,5 @@ +require 'spec_helper' + +describe Alert do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/models/game_attribute_spec.rb b/spec/models/game_attribute_spec.rb new file mode 100644 index 0000000..200e59b --- /dev/null +++ b/spec/models/game_attribute_spec.rb @@ -0,0 +1,5 @@ +require 'spec_helper' + +describe GameAttribute do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/models/game_spec.rb b/spec/models/game_spec.rb new file mode 100644 index 0000000..8c56446 --- /dev/null +++ b/spec/models/game_spec.rb @@ -0,0 +1,5 @@ +require 'spec_helper' + +describe Game do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/models/match_spec.rb b/spec/models/match_spec.rb new file mode 100644 index 0000000..86931c9 --- /dev/null +++ b/spec/models/match_spec.rb @@ -0,0 +1,5 @@ +require 'spec_helper' + +describe Match do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/models/pm_spec.rb b/spec/models/pm_spec.rb new file mode 100644 index 0000000..d56845b --- /dev/null +++ b/spec/models/pm_spec.rb @@ -0,0 +1,5 @@ +require 'spec_helper' + +describe Pm do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/models/server_settings_spec.rb b/spec/models/server_settings_spec.rb new file mode 100644 index 0000000..d579746 --- /dev/null +++ b/spec/models/server_settings_spec.rb @@ -0,0 +1,5 @@ +require 'spec_helper' + +describe ServerSettings do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/models/server_spec.rb b/spec/models/server_spec.rb new file mode 100644 index 0000000..646344a --- /dev/null +++ b/spec/models/server_spec.rb @@ -0,0 +1,5 @@ +require 'spec_helper' + +describe Server do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/models/team_match_pair_spec.rb b/spec/models/team_match_pair_spec.rb new file mode 100644 index 0000000..676c563 --- /dev/null +++ b/spec/models/team_match_pair_spec.rb @@ -0,0 +1,5 @@ +require 'spec_helper' + +describe TeamMatchPair do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/models/team_spec.rb b/spec/models/team_spec.rb new file mode 100644 index 0000000..666a904 --- /dev/null +++ b/spec/models/team_spec.rb @@ -0,0 +1,5 @@ +require 'spec_helper' + +describe Team do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/models/tournament_option_spec.rb b/spec/models/tournament_option_spec.rb new file mode 100644 index 0000000..501b316 --- /dev/null +++ b/spec/models/tournament_option_spec.rb @@ -0,0 +1,5 @@ +require 'spec_helper' + +describe TournamentOption do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/models/tournament_spec.rb b/spec/models/tournament_spec.rb new file mode 100644 index 0000000..56c919d --- /dev/null +++ b/spec/models/tournament_spec.rb @@ -0,0 +1,5 @@ +require 'spec_helper' + +describe Tournament do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb new file mode 100644 index 0000000..44032b4 --- /dev/null +++ b/spec/models/user_spec.rb @@ -0,0 +1,5 @@ +require 'spec_helper' + +describe User do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/models/user_team_pair_spec.rb b/spec/models/user_team_pair_spec.rb new file mode 100644 index 0000000..9947368 --- /dev/null +++ b/spec/models/user_team_pair_spec.rb @@ -0,0 +1,5 @@ +require 'spec_helper' + +describe UserTeamPair do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/requests/alerts_spec.rb b/spec/requests/alerts_spec.rb new file mode 100644 index 0000000..03c332a --- /dev/null +++ b/spec/requests/alerts_spec.rb @@ -0,0 +1,11 @@ +require 'spec_helper' + +describe "Alerts" do + describe "GET /alerts" do + it "works! (now write some real specs)" do + # Run the generator again with the --webrat flag if you want to use webrat methods/matchers + get alerts_path + response.status.should be(200) + end + end +end diff --git a/spec/requests/games_spec.rb b/spec/requests/games_spec.rb new file mode 100644 index 0000000..1a84608 --- /dev/null +++ b/spec/requests/games_spec.rb @@ -0,0 +1,11 @@ +require 'spec_helper' + +describe "Games" do + describe "GET /games" do + it "works! (now write some real specs)" do + # Run the generator again with the --webrat flag if you want to use webrat methods/matchers + get games_path + response.status.should be(200) + end + end +end diff --git a/spec/requests/matches_spec.rb b/spec/requests/matches_spec.rb new file mode 100644 index 0000000..250f746 --- /dev/null +++ b/spec/requests/matches_spec.rb @@ -0,0 +1,11 @@ +require 'spec_helper' + +describe "Matches" do + describe "GET /matches" do + it "works! (now write some real specs)" do + # Run the generator again with the --webrat flag if you want to use webrat methods/matchers + get matches_path + response.status.should be(200) + end + end +end diff --git a/spec/requests/pms_spec.rb b/spec/requests/pms_spec.rb new file mode 100644 index 0000000..1862b87 --- /dev/null +++ b/spec/requests/pms_spec.rb @@ -0,0 +1,11 @@ +require 'spec_helper' + +describe "Pms" do + describe "GET /pms" do + it "works! (now write some real specs)" do + # Run the generator again with the --webrat flag if you want to use webrat methods/matchers + get pms_path + response.status.should be(200) + end + end +end diff --git a/spec/requests/servers_spec.rb b/spec/requests/servers_spec.rb new file mode 100644 index 0000000..2a1562e --- /dev/null +++ b/spec/requests/servers_spec.rb @@ -0,0 +1,11 @@ +require 'spec_helper' + +describe "Servers" do + describe "GET /servers" do + it "works! (now write some real specs)" do + # Run the generator again with the --webrat flag if you want to use webrat methods/matchers + get servers_path + response.status.should be(200) + end + end +end diff --git a/spec/requests/teams_spec.rb b/spec/requests/teams_spec.rb new file mode 100644 index 0000000..f0caf7a --- /dev/null +++ b/spec/requests/teams_spec.rb @@ -0,0 +1,11 @@ +require 'spec_helper' + +describe "Teams" do + describe "GET /teams" do + it "works! (now write some real specs)" do + # Run the generator again with the --webrat flag if you want to use webrat methods/matchers + get teams_path + response.status.should be(200) + end + end +end diff --git a/spec/requests/tournaments_spec.rb b/spec/requests/tournaments_spec.rb new file mode 100644 index 0000000..09b4b55 --- /dev/null +++ b/spec/requests/tournaments_spec.rb @@ -0,0 +1,11 @@ +require 'spec_helper' + +describe "Tournaments" do + describe "GET /tournaments" do + it "works! (now write some real specs)" do + # Run the generator again with the --webrat flag if you want to use webrat methods/matchers + get tournaments_path + response.status.should be(200) + end + end +end diff --git a/spec/routing/alerts_routing_spec.rb b/spec/routing/alerts_routing_spec.rb new file mode 100644 index 0000000..9485907 --- /dev/null +++ b/spec/routing/alerts_routing_spec.rb @@ -0,0 +1,35 @@ +require "spec_helper" + +describe AlertsController do + describe "routing" do + + it "routes to #index" do + get("/alerts").should route_to("alerts#index") + end + + it "routes to #new" do + get("/alerts/new").should route_to("alerts#new") + end + + it "routes to #show" do + get("/alerts/1").should route_to("alerts#show", :id => "1") + end + + it "routes to #edit" do + get("/alerts/1/edit").should route_to("alerts#edit", :id => "1") + end + + it "routes to #create" do + post("/alerts").should route_to("alerts#create") + end + + it "routes to #update" do + put("/alerts/1").should route_to("alerts#update", :id => "1") + end + + it "routes to #destroy" do + delete("/alerts/1").should route_to("alerts#destroy", :id => "1") + end + + end +end diff --git a/spec/routing/games_routing_spec.rb b/spec/routing/games_routing_spec.rb new file mode 100644 index 0000000..3b3ec0c --- /dev/null +++ b/spec/routing/games_routing_spec.rb @@ -0,0 +1,35 @@ +require "spec_helper" + +describe GamesController do + describe "routing" do + + it "routes to #index" do + get("/games").should route_to("games#index") + end + + it "routes to #new" do + get("/games/new").should route_to("games#new") + end + + it "routes to #show" do + get("/games/1").should route_to("games#show", :id => "1") + end + + it "routes to #edit" do + get("/games/1/edit").should route_to("games#edit", :id => "1") + end + + it "routes to #create" do + post("/games").should route_to("games#create") + end + + it "routes to #update" do + put("/games/1").should route_to("games#update", :id => "1") + end + + it "routes to #destroy" do + delete("/games/1").should route_to("games#destroy", :id => "1") + end + + end +end diff --git a/spec/routing/matches_routing_spec.rb b/spec/routing/matches_routing_spec.rb new file mode 100644 index 0000000..a9f8254 --- /dev/null +++ b/spec/routing/matches_routing_spec.rb @@ -0,0 +1,35 @@ +require "spec_helper" + +describe MatchesController do + describe "routing" do + + it "routes to #index" do + get("/matches").should route_to("matches#index") + end + + it "routes to #new" do + get("/matches/new").should route_to("matches#new") + end + + it "routes to #show" do + get("/matches/1").should route_to("matches#show", :id => "1") + end + + it "routes to #edit" do + get("/matches/1/edit").should route_to("matches#edit", :id => "1") + end + + it "routes to #create" do + post("/matches").should route_to("matches#create") + end + + it "routes to #update" do + put("/matches/1").should route_to("matches#update", :id => "1") + end + + it "routes to #destroy" do + delete("/matches/1").should route_to("matches#destroy", :id => "1") + end + + end +end diff --git a/spec/routing/pms_routing_spec.rb b/spec/routing/pms_routing_spec.rb new file mode 100644 index 0000000..839b0a9 --- /dev/null +++ b/spec/routing/pms_routing_spec.rb @@ -0,0 +1,35 @@ +require "spec_helper" + +describe PmsController do + describe "routing" do + + it "routes to #index" do + get("/pms").should route_to("pms#index") + end + + it "routes to #new" do + get("/pms/new").should route_to("pms#new") + end + + it "routes to #show" do + get("/pms/1").should route_to("pms#show", :id => "1") + end + + it "routes to #edit" do + get("/pms/1/edit").should route_to("pms#edit", :id => "1") + end + + it "routes to #create" do + post("/pms").should route_to("pms#create") + end + + it "routes to #update" do + put("/pms/1").should route_to("pms#update", :id => "1") + end + + it "routes to #destroy" do + delete("/pms/1").should route_to("pms#destroy", :id => "1") + end + + end +end diff --git a/spec/routing/servers_routing_spec.rb b/spec/routing/servers_routing_spec.rb new file mode 100644 index 0000000..e514d15 --- /dev/null +++ b/spec/routing/servers_routing_spec.rb @@ -0,0 +1,35 @@ +require "spec_helper" + +describe ServersController do + describe "routing" do + + it "routes to #index" do + get("/servers").should route_to("servers#index") + end + + it "routes to #new" do + get("/servers/new").should route_to("servers#new") + end + + it "routes to #show" do + get("/servers/1").should route_to("servers#show", :id => "1") + end + + it "routes to #edit" do + get("/servers/1/edit").should route_to("servers#edit", :id => "1") + end + + it "routes to #create" do + post("/servers").should route_to("servers#create") + end + + it "routes to #update" do + put("/servers/1").should route_to("servers#update", :id => "1") + end + + it "routes to #destroy" do + delete("/servers/1").should route_to("servers#destroy", :id => "1") + end + + end +end diff --git a/spec/routing/teams_routing_spec.rb b/spec/routing/teams_routing_spec.rb new file mode 100644 index 0000000..818fa7b --- /dev/null +++ b/spec/routing/teams_routing_spec.rb @@ -0,0 +1,35 @@ +require "spec_helper" + +describe TeamsController do + describe "routing" do + + it "routes to #index" do + get("/teams").should route_to("teams#index") + end + + it "routes to #new" do + get("/teams/new").should route_to("teams#new") + end + + it "routes to #show" do + get("/teams/1").should route_to("teams#show", :id => "1") + end + + it "routes to #edit" do + get("/teams/1/edit").should route_to("teams#edit", :id => "1") + end + + it "routes to #create" do + post("/teams").should route_to("teams#create") + end + + it "routes to #update" do + put("/teams/1").should route_to("teams#update", :id => "1") + end + + it "routes to #destroy" do + delete("/teams/1").should route_to("teams#destroy", :id => "1") + end + + end +end diff --git a/spec/routing/tournaments_routing_spec.rb b/spec/routing/tournaments_routing_spec.rb new file mode 100644 index 0000000..e4a229c --- /dev/null +++ b/spec/routing/tournaments_routing_spec.rb @@ -0,0 +1,35 @@ +require "spec_helper" + +describe TournamentsController do + describe "routing" do + + it "routes to #index" do + get("/tournaments").should route_to("tournaments#index") + end + + it "routes to #new" do + get("/tournaments/new").should route_to("tournaments#new") + end + + it "routes to #show" do + get("/tournaments/1").should route_to("tournaments#show", :id => "1") + end + + it "routes to #edit" do + get("/tournaments/1/edit").should route_to("tournaments#edit", :id => "1") + end + + it "routes to #create" do + post("/tournaments").should route_to("tournaments#create") + end + + it "routes to #update" do + put("/tournaments/1").should route_to("tournaments#update", :id => "1") + end + + it "routes to #destroy" do + delete("/tournaments/1").should route_to("tournaments#destroy", :id => "1") + end + + end +end diff --git a/spec/views/alerts/edit.html.erb_spec.rb b/spec/views/alerts/edit.html.erb_spec.rb new file mode 100644 index 0000000..d837f26 --- /dev/null +++ b/spec/views/alerts/edit.html.erb_spec.rb @@ -0,0 +1,20 @@ +require 'spec_helper' + +describe "alerts/edit" do + before(:each) do + @alert = assign(:alert, stub_model(Alert, + :author => nil, + :message => "MyText" + )) + end + + it "renders the edit alert form" do + render + + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "form[action=?][method=?]", alert_path(@alert), "post" do + assert_select "input#alert_author[name=?]", "alert[author]" + assert_select "textarea#alert_message[name=?]", "alert[message]" + end + end +end diff --git a/spec/views/alerts/index.html.erb_spec.rb b/spec/views/alerts/index.html.erb_spec.rb new file mode 100644 index 0000000..a5b4f3c --- /dev/null +++ b/spec/views/alerts/index.html.erb_spec.rb @@ -0,0 +1,23 @@ +require 'spec_helper' + +describe "alerts/index" do + before(:each) do + assign(:alerts, [ + stub_model(Alert, + :author => nil, + :message => "MyText" + ), + stub_model(Alert, + :author => nil, + :message => "MyText" + ) + ]) + end + + it "renders a list of alerts" do + render + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "tr>td", :text => nil.to_s, :count => 2 + assert_select "tr>td", :text => "MyText".to_s, :count => 2 + end +end diff --git a/spec/views/alerts/new.html.erb_spec.rb b/spec/views/alerts/new.html.erb_spec.rb new file mode 100644 index 0000000..e38cbd3 --- /dev/null +++ b/spec/views/alerts/new.html.erb_spec.rb @@ -0,0 +1,20 @@ +require 'spec_helper' + +describe "alerts/new" do + before(:each) do + assign(:alert, stub_model(Alert, + :author => nil, + :message => "MyText" + ).as_new_record) + end + + it "renders new alert form" do + render + + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "form[action=?][method=?]", alerts_path, "post" do + assert_select "input#alert_author[name=?]", "alert[author]" + assert_select "textarea#alert_message[name=?]", "alert[message]" + end + end +end diff --git a/spec/views/alerts/show.html.erb_spec.rb b/spec/views/alerts/show.html.erb_spec.rb new file mode 100644 index 0000000..267c9f1 --- /dev/null +++ b/spec/views/alerts/show.html.erb_spec.rb @@ -0,0 +1,17 @@ +require 'spec_helper' + +describe "alerts/show" do + before(:each) do + @alert = assign(:alert, stub_model(Alert, + :author => nil, + :message => "MyText" + )) + end + + it "renders attributes in

" do + render + # Run the generator again with the --webrat flag if you want to use webrat matchers + rendered.should match(//) + rendered.should match(/MyText/) + end +end diff --git a/spec/views/games/edit.html.erb_spec.rb b/spec/views/games/edit.html.erb_spec.rb new file mode 100644 index 0000000..d568c90 --- /dev/null +++ b/spec/views/games/edit.html.erb_spec.rb @@ -0,0 +1,26 @@ +require 'spec_helper' + +describe "games/edit" do + before(:each) do + @game = assign(:game, stub_model(Game, + :name => "MyText", + :players_per_team => 1, + :teams_per_match => 1, + :set_rounds => 1, + :randomized_teams => 1 + )) + end + + it "renders the edit game form" do + render + + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "form[action=?][method=?]", game_path(@game), "post" do + assert_select "textarea#game_name[name=?]", "game[name]" + assert_select "input#game_players_per_team[name=?]", "game[players_per_team]" + assert_select "input#game_teams_per_match[name=?]", "game[teams_per_match]" + assert_select "input#game_set_rounds[name=?]", "game[set_rounds]" + assert_select "input#game_randomized_teams[name=?]", "game[randomized_teams]" + end + end +end diff --git a/spec/views/games/index.html.erb_spec.rb b/spec/views/games/index.html.erb_spec.rb new file mode 100644 index 0000000..3107393 --- /dev/null +++ b/spec/views/games/index.html.erb_spec.rb @@ -0,0 +1,32 @@ +require 'spec_helper' + +describe "games/index" do + before(:each) do + assign(:games, [ + stub_model(Game, + :name => "MyText", + :players_per_team => 1, + :teams_per_match => 2, + :set_rounds => 3, + :randomized_teams => 4 + ), + stub_model(Game, + :name => "MyText", + :players_per_team => 1, + :teams_per_match => 2, + :set_rounds => 3, + :randomized_teams => 4 + ) + ]) + end + + it "renders a list of games" do + render + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "tr>td", :text => "MyText".to_s, :count => 2 + assert_select "tr>td", :text => 1.to_s, :count => 2 + assert_select "tr>td", :text => 2.to_s, :count => 2 + assert_select "tr>td", :text => 3.to_s, :count => 2 + assert_select "tr>td", :text => 4.to_s, :count => 2 + end +end diff --git a/spec/views/games/new.html.erb_spec.rb b/spec/views/games/new.html.erb_spec.rb new file mode 100644 index 0000000..ebe6113 --- /dev/null +++ b/spec/views/games/new.html.erb_spec.rb @@ -0,0 +1,26 @@ +require 'spec_helper' + +describe "games/new" do + before(:each) do + assign(:game, stub_model(Game, + :name => "MyText", + :players_per_team => 1, + :teams_per_match => 1, + :set_rounds => 1, + :randomized_teams => 1 + ).as_new_record) + end + + it "renders new game form" do + render + + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "form[action=?][method=?]", games_path, "post" do + assert_select "textarea#game_name[name=?]", "game[name]" + assert_select "input#game_players_per_team[name=?]", "game[players_per_team]" + assert_select "input#game_teams_per_match[name=?]", "game[teams_per_match]" + assert_select "input#game_set_rounds[name=?]", "game[set_rounds]" + assert_select "input#game_randomized_teams[name=?]", "game[randomized_teams]" + end + end +end diff --git a/spec/views/games/show.html.erb_spec.rb b/spec/views/games/show.html.erb_spec.rb new file mode 100644 index 0000000..fb75ad6 --- /dev/null +++ b/spec/views/games/show.html.erb_spec.rb @@ -0,0 +1,23 @@ +require 'spec_helper' + +describe "games/show" do + before(:each) do + @game = assign(:game, stub_model(Game, + :name => "MyText", + :players_per_team => 1, + :teams_per_match => 2, + :set_rounds => 3, + :randomized_teams => 4 + )) + end + + it "renders attributes in

" do + render + # Run the generator again with the --webrat flag if you want to use webrat matchers + rendered.should match(/MyText/) + rendered.should match(/1/) + rendered.should match(/2/) + rendered.should match(/3/) + rendered.should match(/4/) + end +end diff --git a/spec/views/matches/edit.html.erb_spec.rb b/spec/views/matches/edit.html.erb_spec.rb new file mode 100644 index 0000000..0f7c673 --- /dev/null +++ b/spec/views/matches/edit.html.erb_spec.rb @@ -0,0 +1,18 @@ +require 'spec_helper' + +describe "matches/edit" do + before(:each) do + @match = assign(:match, stub_model(Match, + :tournament => nil + )) + end + + it "renders the edit match form" do + render + + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "form[action=?][method=?]", match_path(@match), "post" do + assert_select "input#match_tournament[name=?]", "match[tournament]" + end + end +end diff --git a/spec/views/matches/index.html.erb_spec.rb b/spec/views/matches/index.html.erb_spec.rb new file mode 100644 index 0000000..e920f16 --- /dev/null +++ b/spec/views/matches/index.html.erb_spec.rb @@ -0,0 +1,20 @@ +require 'spec_helper' + +describe "matches/index" do + before(:each) do + assign(:matches, [ + stub_model(Match, + :tournament => nil + ), + stub_model(Match, + :tournament => nil + ) + ]) + end + + it "renders a list of matches" do + render + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "tr>td", :text => nil.to_s, :count => 2 + end +end diff --git a/spec/views/matches/new.html.erb_spec.rb b/spec/views/matches/new.html.erb_spec.rb new file mode 100644 index 0000000..c3537dc --- /dev/null +++ b/spec/views/matches/new.html.erb_spec.rb @@ -0,0 +1,18 @@ +require 'spec_helper' + +describe "matches/new" do + before(:each) do + assign(:match, stub_model(Match, + :tournament => nil + ).as_new_record) + end + + it "renders new match form" do + render + + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "form[action=?][method=?]", matches_path, "post" do + assert_select "input#match_tournament[name=?]", "match[tournament]" + end + end +end diff --git a/spec/views/matches/show.html.erb_spec.rb b/spec/views/matches/show.html.erb_spec.rb new file mode 100644 index 0000000..4460feb --- /dev/null +++ b/spec/views/matches/show.html.erb_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +describe "matches/show" do + before(:each) do + @match = assign(:match, stub_model(Match, + :tournament => nil + )) + end + + it "renders attributes in

" do + render + # Run the generator again with the --webrat flag if you want to use webrat matchers + rendered.should match(//) + end +end diff --git a/spec/views/pms/edit.html.erb_spec.rb b/spec/views/pms/edit.html.erb_spec.rb new file mode 100644 index 0000000..5ec0de5 --- /dev/null +++ b/spec/views/pms/edit.html.erb_spec.rb @@ -0,0 +1,22 @@ +require 'spec_helper' + +describe "pms/edit" do + before(:each) do + @pm = assign(:pm, stub_model(Pm, + :author => nil, + :recipient => nil, + :message => "MyText" + )) + end + + it "renders the edit pm form" do + render + + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "form[action=?][method=?]", pm_path(@pm), "post" do + assert_select "input#pm_author[name=?]", "pm[author]" + assert_select "input#pm_recipient[name=?]", "pm[recipient]" + assert_select "textarea#pm_message[name=?]", "pm[message]" + end + end +end diff --git a/spec/views/pms/index.html.erb_spec.rb b/spec/views/pms/index.html.erb_spec.rb new file mode 100644 index 0000000..a3bc733 --- /dev/null +++ b/spec/views/pms/index.html.erb_spec.rb @@ -0,0 +1,26 @@ +require 'spec_helper' + +describe "pms/index" do + before(:each) do + assign(:pms, [ + stub_model(Pm, + :author => nil, + :recipient => nil, + :message => "MyText" + ), + stub_model(Pm, + :author => nil, + :recipient => nil, + :message => "MyText" + ) + ]) + end + + it "renders a list of pms" do + render + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "tr>td", :text => nil.to_s, :count => 2 + assert_select "tr>td", :text => nil.to_s, :count => 2 + assert_select "tr>td", :text => "MyText".to_s, :count => 2 + end +end diff --git a/spec/views/pms/new.html.erb_spec.rb b/spec/views/pms/new.html.erb_spec.rb new file mode 100644 index 0000000..342af96 --- /dev/null +++ b/spec/views/pms/new.html.erb_spec.rb @@ -0,0 +1,22 @@ +require 'spec_helper' + +describe "pms/new" do + before(:each) do + assign(:pm, stub_model(Pm, + :author => nil, + :recipient => nil, + :message => "MyText" + ).as_new_record) + end + + it "renders new pm form" do + render + + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "form[action=?][method=?]", pms_path, "post" do + assert_select "input#pm_author[name=?]", "pm[author]" + assert_select "input#pm_recipient[name=?]", "pm[recipient]" + assert_select "textarea#pm_message[name=?]", "pm[message]" + end + end +end diff --git a/spec/views/pms/show.html.erb_spec.rb b/spec/views/pms/show.html.erb_spec.rb new file mode 100644 index 0000000..5802887 --- /dev/null +++ b/spec/views/pms/show.html.erb_spec.rb @@ -0,0 +1,19 @@ +require 'spec_helper' + +describe "pms/show" do + before(:each) do + @pm = assign(:pm, stub_model(Pm, + :author => nil, + :recipient => nil, + :message => "MyText" + )) + end + + it "renders attributes in

" do + render + # Run the generator again with the --webrat flag if you want to use webrat matchers + rendered.should match(//) + rendered.should match(//) + rendered.should match(/MyText/) + end +end diff --git a/spec/views/servers/edit.html.erb_spec.rb b/spec/views/servers/edit.html.erb_spec.rb new file mode 100644 index 0000000..870126c --- /dev/null +++ b/spec/views/servers/edit.html.erb_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +describe "servers/edit" do + before(:each) do + @server = assign(:server, stub_model(Server)) + end + + it "renders the edit server form" do + render + + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "form[action=?][method=?]", server_path(@server), "post" do + end + end +end diff --git a/spec/views/servers/index.html.erb_spec.rb b/spec/views/servers/index.html.erb_spec.rb new file mode 100644 index 0000000..9af4a19 --- /dev/null +++ b/spec/views/servers/index.html.erb_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +describe "servers/index" do + before(:each) do + assign(:servers, [ + stub_model(Server), + stub_model(Server) + ]) + end + + it "renders a list of servers" do + render + # Run the generator again with the --webrat flag if you want to use webrat matchers + end +end diff --git a/spec/views/servers/new.html.erb_spec.rb b/spec/views/servers/new.html.erb_spec.rb new file mode 100644 index 0000000..bfc69c5 --- /dev/null +++ b/spec/views/servers/new.html.erb_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +describe "servers/new" do + before(:each) do + assign(:server, stub_model(Server).as_new_record) + end + + it "renders new server form" do + render + + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "form[action=?][method=?]", servers_path, "post" do + end + end +end diff --git a/spec/views/servers/show.html.erb_spec.rb b/spec/views/servers/show.html.erb_spec.rb new file mode 100644 index 0000000..3762389 --- /dev/null +++ b/spec/views/servers/show.html.erb_spec.rb @@ -0,0 +1,12 @@ +require 'spec_helper' + +describe "servers/show" do + before(:each) do + @server = assign(:server, stub_model(Server)) + end + + it "renders attributes in

" do + render + # Run the generator again with the --webrat flag if you want to use webrat matchers + end +end diff --git a/spec/views/teams/edit.html.erb_spec.rb b/spec/views/teams/edit.html.erb_spec.rb new file mode 100644 index 0000000..1153b6d --- /dev/null +++ b/spec/views/teams/edit.html.erb_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +describe "teams/edit" do + before(:each) do + @team = assign(:team, stub_model(Team)) + end + + it "renders the edit team form" do + render + + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "form[action=?][method=?]", team_path(@team), "post" do + end + end +end diff --git a/spec/views/teams/index.html.erb_spec.rb b/spec/views/teams/index.html.erb_spec.rb new file mode 100644 index 0000000..e894f36 --- /dev/null +++ b/spec/views/teams/index.html.erb_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +describe "teams/index" do + before(:each) do + assign(:teams, [ + stub_model(Team), + stub_model(Team) + ]) + end + + it "renders a list of teams" do + render + # Run the generator again with the --webrat flag if you want to use webrat matchers + end +end diff --git a/spec/views/teams/new.html.erb_spec.rb b/spec/views/teams/new.html.erb_spec.rb new file mode 100644 index 0000000..6a05475 --- /dev/null +++ b/spec/views/teams/new.html.erb_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +describe "teams/new" do + before(:each) do + assign(:team, stub_model(Team).as_new_record) + end + + it "renders new team form" do + render + + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "form[action=?][method=?]", teams_path, "post" do + end + end +end diff --git a/spec/views/teams/show.html.erb_spec.rb b/spec/views/teams/show.html.erb_spec.rb new file mode 100644 index 0000000..1d8ebd5 --- /dev/null +++ b/spec/views/teams/show.html.erb_spec.rb @@ -0,0 +1,12 @@ +require 'spec_helper' + +describe "teams/show" do + before(:each) do + @team = assign(:team, stub_model(Team)) + end + + it "renders attributes in

" do + render + # Run the generator again with the --webrat flag if you want to use webrat matchers + end +end diff --git a/spec/views/tournaments/edit.html.erb_spec.rb b/spec/views/tournaments/edit.html.erb_spec.rb new file mode 100644 index 0000000..db7cbb5 --- /dev/null +++ b/spec/views/tournaments/edit.html.erb_spec.rb @@ -0,0 +1,18 @@ +require 'spec_helper' + +describe "tournaments/edit" do + before(:each) do + @tournament = assign(:tournament, stub_model(Tournament, + :game => nil + )) + end + + it "renders the edit tournament form" do + render + + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "form[action=?][method=?]", tournament_path(@tournament), "post" do + assert_select "input#tournament_game[name=?]", "tournament[game]" + end + end +end diff --git a/spec/views/tournaments/index.html.erb_spec.rb b/spec/views/tournaments/index.html.erb_spec.rb new file mode 100644 index 0000000..bf36e06 --- /dev/null +++ b/spec/views/tournaments/index.html.erb_spec.rb @@ -0,0 +1,20 @@ +require 'spec_helper' + +describe "tournaments/index" do + before(:each) do + assign(:tournaments, [ + stub_model(Tournament, + :game => nil + ), + stub_model(Tournament, + :game => nil + ) + ]) + end + + it "renders a list of tournaments" do + render + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "tr>td", :text => nil.to_s, :count => 2 + end +end diff --git a/spec/views/tournaments/new.html.erb_spec.rb b/spec/views/tournaments/new.html.erb_spec.rb new file mode 100644 index 0000000..49785a4 --- /dev/null +++ b/spec/views/tournaments/new.html.erb_spec.rb @@ -0,0 +1,18 @@ +require 'spec_helper' + +describe "tournaments/new" do + before(:each) do + assign(:tournament, stub_model(Tournament, + :game => nil + ).as_new_record) + end + + it "renders new tournament form" do + render + + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "form[action=?][method=?]", tournaments_path, "post" do + assert_select "input#tournament_game[name=?]", "tournament[game]" + end + end +end diff --git a/spec/views/tournaments/show.html.erb_spec.rb b/spec/views/tournaments/show.html.erb_spec.rb new file mode 100644 index 0000000..abb1879 --- /dev/null +++ b/spec/views/tournaments/show.html.erb_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +describe "tournaments/show" do + before(:each) do + @tournament = assign(:tournament, stub_model(Tournament, + :game => nil + )) + end + + it "renders attributes in

" do + render + # Run the generator again with the --webrat flag if you want to use webrat matchers + rendered.should match(//) + end +end diff --git a/test/controllers/alerts_controller_test.rb b/test/controllers/alerts_controller_test.rb deleted file mode 100644 index 4a5d911..0000000 --- a/test/controllers/alerts_controller_test.rb +++ /dev/null @@ -1,49 +0,0 @@ -require 'test_helper' - -class AlertsControllerTest < ActionController::TestCase - setup do - @alert = alerts(:one) - end - - test "should get index" do - get :index - assert_response :success - assert_not_nil assigns(:alerts) - end - - test "should get new" do - get :new - assert_response :success - end - - test "should create alert" do - assert_difference('Alert.count') do - post :create, alert: { author_id: @alert.author_id, message: @alert.message } - end - - assert_redirected_to alert_path(assigns(:alert)) - end - - test "should show alert" do - get :show, id: @alert - assert_response :success - end - - test "should get edit" do - get :edit, id: @alert - assert_response :success - end - - test "should update alert" do - patch :update, id: @alert, alert: { author_id: @alert.author_id, message: @alert.message } - assert_redirected_to alert_path(assigns(:alert)) - end - - test "should destroy alert" do - assert_difference('Alert.count', -1) do - delete :destroy, id: @alert - end - - assert_redirected_to alerts_path - end -end diff --git a/test/controllers/games_controller_test.rb b/test/controllers/games_controller_test.rb deleted file mode 100644 index 95c3145..0000000 --- a/test/controllers/games_controller_test.rb +++ /dev/null @@ -1,49 +0,0 @@ -require 'test_helper' - -class GamesControllerTest < ActionController::TestCase - setup do - @game = games(:one) - end - - test "should get index" do - get :index - assert_response :success - assert_not_nil assigns(:games) - end - - test "should get new" do - get :new - assert_response :success - end - - test "should create game" do - assert_difference('Game.count') do - post :create, game: { name: @game.name, players_per_team: @game.players_per_team, randomized_teams: @game.randomized_teams, set_rounds: @game.set_rounds, teams_per_match: @game.teams_per_match } - end - - assert_redirected_to game_path(assigns(:game)) - end - - test "should show game" do - get :show, id: @game - assert_response :success - end - - test "should get edit" do - get :edit, id: @game - assert_response :success - end - - test "should update game" do - patch :update, id: @game, game: { name: @game.name, players_per_team: @game.players_per_team, randomized_teams: @game.randomized_teams, set_rounds: @game.set_rounds, teams_per_match: @game.teams_per_match } - assert_redirected_to game_path(assigns(:game)) - end - - test "should destroy game" do - assert_difference('Game.count', -1) do - delete :destroy, id: @game - end - - assert_redirected_to games_path - end -end diff --git a/test/controllers/main_controller_test.rb b/test/controllers/main_controller_test.rb deleted file mode 100644 index b7ec6bf..0000000 --- a/test/controllers/main_controller_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class MainControllerTest < ActionController::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/controllers/matches_controller_test.rb b/test/controllers/matches_controller_test.rb deleted file mode 100644 index 75c9dcf..0000000 --- a/test/controllers/matches_controller_test.rb +++ /dev/null @@ -1,49 +0,0 @@ -require 'test_helper' - -class MatchesControllerTest < ActionController::TestCase - setup do - @match = matches(:one) - end - - test "should get index" do - get :index - assert_response :success - assert_not_nil assigns(:matches) - end - - test "should get new" do - get :new - assert_response :success - end - - test "should create match" do - assert_difference('Match.count') do - post :create, match: { tournament_id: @match.tournament_id } - end - - assert_redirected_to match_path(assigns(:match)) - end - - test "should show match" do - get :show, id: @match - assert_response :success - end - - test "should get edit" do - get :edit, id: @match - assert_response :success - end - - test "should update match" do - patch :update, id: @match, match: { tournament_id: @match.tournament_id } - assert_redirected_to match_path(assigns(:match)) - end - - test "should destroy match" do - assert_difference('Match.count', -1) do - delete :destroy, id: @match - end - - assert_redirected_to matches_path - end -end diff --git a/test/controllers/pms_controller_test.rb b/test/controllers/pms_controller_test.rb deleted file mode 100644 index 18b2449..0000000 --- a/test/controllers/pms_controller_test.rb +++ /dev/null @@ -1,49 +0,0 @@ -require 'test_helper' - -class PmsControllerTest < ActionController::TestCase - setup do - @pm = pms(:one) - end - - test "should get index" do - get :index - assert_response :success - assert_not_nil assigns(:pms) - end - - test "should get new" do - get :new - assert_response :success - end - - test "should create pm" do - assert_difference('Pm.count') do - post :create, pm: { author_id: @pm.author_id, message: @pm.message, recipient_id: @pm.recipient_id } - end - - assert_redirected_to pm_path(assigns(:pm)) - end - - test "should show pm" do - get :show, id: @pm - assert_response :success - end - - test "should get edit" do - get :edit, id: @pm - assert_response :success - end - - test "should update pm" do - patch :update, id: @pm, pm: { author_id: @pm.author_id, message: @pm.message, recipient_id: @pm.recipient_id } - assert_redirected_to pm_path(assigns(:pm)) - end - - test "should destroy pm" do - assert_difference('Pm.count', -1) do - delete :destroy, id: @pm - end - - assert_redirected_to pms_path - end -end diff --git a/test/controllers/search_controller_test.rb b/test/controllers/search_controller_test.rb deleted file mode 100644 index bfbf22d..0000000 --- a/test/controllers/search_controller_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class SearchControllerTest < ActionController::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/controllers/servers_controller_test.rb b/test/controllers/servers_controller_test.rb deleted file mode 100644 index 5891bb0..0000000 --- a/test/controllers/servers_controller_test.rb +++ /dev/null @@ -1,49 +0,0 @@ -require 'test_helper' - -class ServersControllerTest < ActionController::TestCase - setup do - @server = servers(:one) - end - - test "should get index" do - get :index - assert_response :success - assert_not_nil assigns(:servers) - end - - test "should get new" do - get :new - assert_response :success - end - - test "should create server" do - assert_difference('Server.count') do - post :create, server: { } - end - - assert_redirected_to server_path(assigns(:server)) - end - - test "should show server" do - get :show, id: @server - assert_response :success - end - - test "should get edit" do - get :edit, id: @server - assert_response :success - end - - test "should update server" do - patch :update, id: @server, server: { } - assert_redirected_to server_path(assigns(:server)) - end - - test "should destroy server" do - assert_difference('Server.count', -1) do - delete :destroy, id: @server - end - - assert_redirected_to servers_path - end -end diff --git a/test/controllers/teams_controller_test.rb b/test/controllers/teams_controller_test.rb deleted file mode 100644 index 8bf60be..0000000 --- a/test/controllers/teams_controller_test.rb +++ /dev/null @@ -1,49 +0,0 @@ -require 'test_helper' - -class TeamsControllerTest < ActionController::TestCase - setup do - @team = teams(:one) - end - - test "should get index" do - get :index - assert_response :success - assert_not_nil assigns(:teams) - end - - test "should get new" do - get :new - assert_response :success - end - - test "should create team" do - assert_difference('Team.count') do - post :create, team: { } - end - - assert_redirected_to team_path(assigns(:team)) - end - - test "should show team" do - get :show, id: @team - assert_response :success - end - - test "should get edit" do - get :edit, id: @team - assert_response :success - end - - test "should update team" do - patch :update, id: @team, team: { } - assert_redirected_to team_path(assigns(:team)) - end - - test "should destroy team" do - assert_difference('Team.count', -1) do - delete :destroy, id: @team - end - - assert_redirected_to teams_path - end -end diff --git a/test/controllers/tournaments_controller_test.rb b/test/controllers/tournaments_controller_test.rb deleted file mode 100644 index bdbbfac..0000000 --- a/test/controllers/tournaments_controller_test.rb +++ /dev/null @@ -1,49 +0,0 @@ -require 'test_helper' - -class TournamentsControllerTest < ActionController::TestCase - setup do - @tournament = tournaments(:one) - end - - test "should get index" do - get :index - assert_response :success - assert_not_nil assigns(:tournaments) - end - - test "should get new" do - get :new - assert_response :success - end - - test "should create tournament" do - assert_difference('Tournament.count') do - post :create, tournament: { game_id: @tournament.game_id } - end - - assert_redirected_to tournament_path(assigns(:tournament)) - end - - test "should show tournament" do - get :show, id: @tournament - assert_response :success - end - - test "should get edit" do - get :edit, id: @tournament - assert_response :success - end - - test "should update tournament" do - patch :update, id: @tournament, tournament: { game_id: @tournament.game_id } - assert_redirected_to tournament_path(assigns(:tournament)) - end - - test "should destroy tournament" do - assert_difference('Tournament.count', -1) do - delete :destroy, id: @tournament - end - - assert_redirected_to tournaments_path - end -end diff --git a/test/controllers/users_controller_test.rb b/test/controllers/users_controller_test.rb deleted file mode 100644 index d23f182..0000000 --- a/test/controllers/users_controller_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class UsersControllerTest < ActionController::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/fixtures/alerts.yml b/test/fixtures/alerts.yml deleted file mode 100644 index 52959af..0000000 --- a/test/fixtures/alerts.yml +++ /dev/null @@ -1,9 +0,0 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html - -one: - author_id: - message: MyText - -two: - author_id: - message: MyText diff --git a/test/fixtures/game_attributes.yml b/test/fixtures/game_attributes.yml deleted file mode 100644 index eff7212..0000000 --- a/test/fixtures/game_attributes.yml +++ /dev/null @@ -1,11 +0,0 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html - -one: - game_id: - key: MyText - type: 1 - -two: - game_id: - key: MyText - type: 1 diff --git a/test/fixtures/games.yml b/test/fixtures/games.yml deleted file mode 100644 index 3068527..0000000 --- a/test/fixtures/games.yml +++ /dev/null @@ -1,15 +0,0 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html - -one: - name: MyText - players_per_team: 1 - teams_per_match: 1 - set_rounds: 1 - randomized_teams: 1 - -two: - name: MyText - players_per_team: 1 - teams_per_match: 1 - set_rounds: 1 - randomized_teams: 1 diff --git a/test/fixtures/matches.yml b/test/fixtures/matches.yml deleted file mode 100644 index 0356cee..0000000 --- a/test/fixtures/matches.yml +++ /dev/null @@ -1,7 +0,0 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html - -one: - tournament_id: - -two: - tournament_id: diff --git a/test/fixtures/pms.yml b/test/fixtures/pms.yml deleted file mode 100644 index f77e727..0000000 --- a/test/fixtures/pms.yml +++ /dev/null @@ -1,11 +0,0 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html - -one: - author_id: - recipient_id: - message: MyText - -two: - author_id: - recipient_id: - message: MyText diff --git a/test/fixtures/server_settings.yml b/test/fixtures/server_settings.yml deleted file mode 100644 index 937a0c0..0000000 --- a/test/fixtures/server_settings.yml +++ /dev/null @@ -1,11 +0,0 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html - -# This model initially had no columns defined. If you add columns to the -# model remove the '{}' from the fixture names and add the columns immediately -# below each fixture, per the syntax in the comments below -# -one: {} -# column: value -# -two: {} -# column: value diff --git a/test/fixtures/servers.yml b/test/fixtures/servers.yml deleted file mode 100644 index 937a0c0..0000000 --- a/test/fixtures/servers.yml +++ /dev/null @@ -1,11 +0,0 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html - -# This model initially had no columns defined. If you add columns to the -# model remove the '{}' from the fixture names and add the columns immediately -# below each fixture, per the syntax in the comments below -# -one: {} -# column: value -# -two: {} -# column: value diff --git a/test/fixtures/team_match_pairs.yml b/test/fixtures/team_match_pairs.yml deleted file mode 100644 index 5f9cf2f..0000000 --- a/test/fixtures/team_match_pairs.yml +++ /dev/null @@ -1,9 +0,0 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html - -one: - team_id: - match_id: - -two: - team_id: - match_id: diff --git a/test/fixtures/teams.yml b/test/fixtures/teams.yml deleted file mode 100644 index 937a0c0..0000000 --- a/test/fixtures/teams.yml +++ /dev/null @@ -1,11 +0,0 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html - -# This model initially had no columns defined. If you add columns to the -# model remove the '{}' from the fixture names and add the columns immediately -# below each fixture, per the syntax in the comments below -# -one: {} -# column: value -# -two: {} -# column: value diff --git a/test/fixtures/tournament_options.yml b/test/fixtures/tournament_options.yml deleted file mode 100644 index 937a0c0..0000000 --- a/test/fixtures/tournament_options.yml +++ /dev/null @@ -1,11 +0,0 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html - -# This model initially had no columns defined. If you add columns to the -# model remove the '{}' from the fixture names and add the columns immediately -# below each fixture, per the syntax in the comments below -# -one: {} -# column: value -# -two: {} -# column: value diff --git a/test/fixtures/tournaments.yml b/test/fixtures/tournaments.yml deleted file mode 100644 index 4cba7ca..0000000 --- a/test/fixtures/tournaments.yml +++ /dev/null @@ -1,7 +0,0 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html - -one: - game_id: - -two: - game_id: diff --git a/test/fixtures/user_team_pairs.yml b/test/fixtures/user_team_pairs.yml deleted file mode 100644 index a76036f..0000000 --- a/test/fixtures/user_team_pairs.yml +++ /dev/null @@ -1,9 +0,0 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html - -one: - user_id: - team_id: - -two: - user_id: - team_id: diff --git a/test/fixtures/users.yml b/test/fixtures/users.yml deleted file mode 100644 index ea3e874..0000000 --- a/test/fixtures/users.yml +++ /dev/null @@ -1,11 +0,0 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html - -one: - name: MyString - email: MyString - user_name: MyString - -two: - name: MyString - email: MyString - user_name: MyString diff --git a/test/helpers/alerts_helper_test.rb b/test/helpers/alerts_helper_test.rb deleted file mode 100644 index 1d9079d..0000000 --- a/test/helpers/alerts_helper_test.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'test_helper' - -class AlertsHelperTest < ActionView::TestCase -end diff --git a/test/helpers/games_helper_test.rb b/test/helpers/games_helper_test.rb deleted file mode 100644 index 449a85c..0000000 --- a/test/helpers/games_helper_test.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'test_helper' - -class GamesHelperTest < ActionView::TestCase -end diff --git a/test/helpers/main_helper_test.rb b/test/helpers/main_helper_test.rb deleted file mode 100644 index 22da3c4..0000000 --- a/test/helpers/main_helper_test.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'test_helper' - -class MainHelperTest < ActionView::TestCase -end diff --git a/test/helpers/matches_helper_test.rb b/test/helpers/matches_helper_test.rb deleted file mode 100644 index 4cc472f..0000000 --- a/test/helpers/matches_helper_test.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'test_helper' - -class MatchesHelperTest < ActionView::TestCase -end diff --git a/test/helpers/pms_helper_test.rb b/test/helpers/pms_helper_test.rb deleted file mode 100644 index af80f10..0000000 --- a/test/helpers/pms_helper_test.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'test_helper' - -class PmsHelperTest < ActionView::TestCase -end diff --git a/test/helpers/search_helper_test.rb b/test/helpers/search_helper_test.rb deleted file mode 100644 index 3034163..0000000 --- a/test/helpers/search_helper_test.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'test_helper' - -class SearchHelperTest < ActionView::TestCase -end diff --git a/test/helpers/servers_helper_test.rb b/test/helpers/servers_helper_test.rb deleted file mode 100644 index 8fddf34..0000000 --- a/test/helpers/servers_helper_test.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'test_helper' - -class ServersHelperTest < ActionView::TestCase -end diff --git a/test/helpers/teams_helper_test.rb b/test/helpers/teams_helper_test.rb deleted file mode 100644 index b736483..0000000 --- a/test/helpers/teams_helper_test.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'test_helper' - -class TeamsHelperTest < ActionView::TestCase -end diff --git a/test/helpers/tournaments_helper_test.rb b/test/helpers/tournaments_helper_test.rb deleted file mode 100644 index 1cf5269..0000000 --- a/test/helpers/tournaments_helper_test.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'test_helper' - -class TournamentsHelperTest < ActionView::TestCase -end diff --git a/test/helpers/users_helper_test.rb b/test/helpers/users_helper_test.rb deleted file mode 100644 index 96af37a..0000000 --- a/test/helpers/users_helper_test.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'test_helper' - -class UsersHelperTest < ActionView::TestCase -end diff --git a/test/models/alert_test.rb b/test/models/alert_test.rb deleted file mode 100644 index b59c65e..0000000 --- a/test/models/alert_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class AlertTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/models/game_attribute_test.rb b/test/models/game_attribute_test.rb deleted file mode 100644 index 13c6e65..0000000 --- a/test/models/game_attribute_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class GameAttributeTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/models/game_test.rb b/test/models/game_test.rb deleted file mode 100644 index 2cab36e..0000000 --- a/test/models/game_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class GameTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/models/match_test.rb b/test/models/match_test.rb deleted file mode 100644 index 14436b1..0000000 --- a/test/models/match_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class MatchTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/models/pm_test.rb b/test/models/pm_test.rb deleted file mode 100644 index e7f6b8f..0000000 --- a/test/models/pm_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class PmTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/models/server_settings_test.rb b/test/models/server_settings_test.rb deleted file mode 100644 index 470b316..0000000 --- a/test/models/server_settings_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class ServerSettingsTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/models/server_test.rb b/test/models/server_test.rb deleted file mode 100644 index 125ffc9..0000000 --- a/test/models/server_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class ServerTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/models/team_match_pair_test.rb b/test/models/team_match_pair_test.rb deleted file mode 100644 index c250b3c..0000000 --- a/test/models/team_match_pair_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class TeamMatchPairTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/models/team_test.rb b/test/models/team_test.rb deleted file mode 100644 index 8b101cb..0000000 --- a/test/models/team_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class TeamTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/models/tournament_option_test.rb b/test/models/tournament_option_test.rb deleted file mode 100644 index 8fa9628..0000000 --- a/test/models/tournament_option_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class TournamentOptionTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/models/tournament_test.rb b/test/models/tournament_test.rb deleted file mode 100644 index 24a7e5f..0000000 --- a/test/models/tournament_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class TournamentTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/models/user_team_pair_test.rb b/test/models/user_team_pair_test.rb deleted file mode 100644 index 55f5c58..0000000 --- a/test/models/user_team_pair_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class UserTeamPairTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/models/user_test.rb b/test/models/user_test.rb deleted file mode 100644 index 82f61e0..0000000 --- a/test/models/user_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class UserTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end -- cgit v1.1-4-g5e80