RSpec与FactoryGirl:为什么这么慢?

时间:2011-09-09 18:00:21

标签: ruby-on-rails rspec factory-bot

为什么世界上这需要20秒?它几乎没有做任何事......

我正在使用Rails 3.0.7

  • factory_girl(2.0.5)
  • factory_girl_rails(1.1.0)

  • rspec(2.6.0)

  • rspec-core(2.6.4)
  • rspec-expectations(2.6.0)
  • rspec-mocks(2.6.0)
  • rspec-rails(2.6.1)

FactoryGirl.define do

  factory :user do
    factory :admin_one do
      initial_business_name "Spa"
      email "mac@test.com"
      subdomain "test"
    end
  end

end

require 'spec_helper'

describe StaffMembersController do

  before (:each) do
    @user = Factory(:admin_one)
  end

  shared_examples_for "index vars" do

    it "sets @new_vacation" do
    end

    it "assigns @all_services" do
    end

    it "assigns @has_hit_staff_limit" do
    end

  end

  describe "GET index" do

    it_behaves_like "index vars"

  end

end

Finished in 20.86 seconds
3 examples, 0 failures

0 个答案:

没有答案