Sha256: 6f513a806a6d4bdd338e67d65d174842f6398771e83a7454527b493c55d07e69

Contents?: true

Size: 1.96 KB

Versions: 16

Compression:

Stored size: 1.96 KB

Contents

require 'spec_helper'

describe "Quorum" do
  before(:all) do
    @dummy_path = File.expand_path("../dummy/", __FILE__)
  end

  it "checks for generated config file" do
    File.exists?(
      File.join(@dummy_path, "config", "quorum_settings.yml")
    ).should be_true
  end

  it "checks for generated initializer" do
    File.exists?(
      File.join(@dummy_path, "config", "initializers", "quorum_initializer.rb")
    ).should be_true
  end

  it "checks for generated locale" do
    File.exists?(
      File.join(@dummy_path, "config", "locales", "quorum.en.yml")
    ).should be_true
  end

  it "checks for quorum directory" do
    File.directory?(File.join(@dummy_path, "quorum")).should be_true
  end

  it "checks for quorum/lib files" do
    File.exists?(
      File.join(@dummy_path, "quorum", "lib", "search_tools", "blast.rb")
    ).should be_true

    File.exists?(
      File.join(@dummy_path, "quorum", "lib", "logger.rb")
    ).should be_true

    File.exists?(
      File.join(@dummy_path, "quorum", "lib", "trollop.rb")
    ).should be_true
  end

  it "checks for quorum/bin files and ensures they are executable" do
    File.exists?(
      File.join(@dummy_path, "quorum", "bin", "search")
    ).should be_true

    File.executable?(
      File.join(@dummy_path, "quorum", "bin", "search")
    ).should be_true
  end

  it "checks for generated directories" do
    File.directory?(File.join(@dummy_path, "quorum", "log")).should be_true

    File.directory?(File.join(@dummy_path, "quorum", "tmp")).should be_true
  end

  it "ensures Quorum::Engine is mounted in dummy/config/routes.rb" do
    f = File.open(File.join(@dummy_path, "config", "routes.rb"), "r")
    f.read.include?("mount Quorum::Engine => \"/quorum\"").should be_true
  end

  it "ensures Resque::Server is mounted in dummy/config/routes.rb" do
    f = File.open(File.join(@dummy_path, "config", "routes.rb"), "r")
    f.read.include?("mount Resque::Server.new, :at => \"/quorum/resque\"").should be_true
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
quorum-0.8.2 spec/quorum_installed_spec.rb
quorum-0.8.1 spec/quorum_installed_spec.rb
quorum-0.8.0 spec/quorum_installed_spec.rb
quorum-0.7.1 spec/quorum_installed_spec.rb
quorum-0.7.0 spec/quorum_installed_spec.rb
quorum-0.6.0 spec/quorum_installed_spec.rb
quorum-0.5.2 spec/quorum_installed_spec.rb
quorum-0.5.1 spec/quorum_installed_spec.rb
quorum-0.5.0 spec/quorum_installed_spec.rb
quorum-0.4.0 spec/quorum_installed_spec.rb
quorum-0.3.3 spec/quorum_installed_spec.rb
quorum-0.3.2 spec/quorum_installed_spec.rb
quorum-0.3.1 spec/quorum_installed_spec.rb
quorum-0.3.0 spec/quorum_installed_spec.rb
quorum-0.2.1 spec/quorum_installed_spec.rb
quorum-0.2.0 spec/quorum_installed_spec.rb