Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

small spec performance tweaks

  • Loading branch information...
commit 94f5c207c46dfb87eeaa31fab973d0f0aece2188 1 parent 94a5967
@bbenezech bbenezech authored
View
14 spec/integration/basic/list/rails_admin_basic_list_spec.rb
@@ -30,7 +30,8 @@
describe "GET /admin/player as list" do
it "shows \"List of Models\", should show filters and should show column headers" do
- 21.times { FactoryGirl.create :player } # two pages of players
+ RailsAdmin.config.default_items_per_page = 1
+ 2.times { FactoryGirl.create :player } # two pages of players
visit index_path(:model_name => "player")
should have_content("List of Players")
should have_content("Created at")
@@ -295,19 +296,20 @@
end
end
- describe "GET /admin/player with 20 objects" do
+ describe "GET /admin/player with 2 objects" do
before(:each) do
- @players = 20.times.map { FactoryGirl.create :player }
+ @players = 2.times.map { FactoryGirl.create :player }
visit index_path(:model_name => "player")
end
- it "shows \"20 results\"" do
- should have_content("20 players")
+ it "shows \"2 results\"" do
+ should have_content("2 players")
end
end
describe "GET /admin/player with 3 pages, page 2" do
- before(:each) do
+ before do
+ RailsAdmin.config.default_items_per_page = 1
items_per_page = RailsAdmin.config.default_items_per_page
(items_per_page * 3).times { FactoryGirl.create(:player) }
visit index_path(:model_name => "player", :page => 2)
View
2  spec/integration/rails_admin_spec.rb
@@ -8,6 +8,7 @@
it "is disableable" do
logout
RailsAdmin.config do |config|
+ config.included_models = []
config.authenticate_with {}
end
visit dashboard_path
@@ -19,6 +20,7 @@
# file as template for a new translation).
describe "localization" do
it "defaults to English" do
+ RailsAdmin.config.included_models = []
visit dashboard_path
should have_content("Site administration")
Please sign in to comment.
Something went wrong with that request. Please try again.