Sha256: feeab332d64c195e3780cd55a89d774571894636670c18f3ec1eaf42f993b42f

Contents?: true

Size: 941 Bytes

Versions: 1

Compression:

Stored size: 941 Bytes

Contents

require 'spec_helper'

describe Matcha do
  describe ".config" do
    subject { Matcha.config }

    describe ".interface" do
      it "defaults to :bdd interface" do
        subject.interface.should == :bdd
      end
    end

    describe ".spec_dir" do
      it "defaults to 'spec/javascripts'" do
        subject.spec_dir.should == "spec/javascripts"
      end
    end
  end

  describe ".spec_paths" do
    subject { Matcha.spec_paths }

    it "returns an array of paths relative to spec_dir" do
      subject.should include("array_sum_js_spec.js")
      subject.should include("array_sum_cs_spec.js.coffee")
    end

    it "includes subdirectories" do
      subject.should include("subdirectory/subdirectory_spec.js")
    end

    it "does not include spec_helper" do
      subject.should_not include("spec_helper.js")
    end
  end

  it "can be configured in an initializer" do
    Matcha.config.configured.should == true
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
matcha-0.9.0 spec/matcha_spec.rb