Sha256: 1974a1229727ce7c5ee42370687cdb54dfd9f09d12410e23baf5c4a92801d678
Contents?: true
Size: 1.04 KB
Versions: 9
Compression:
Stored size: 1.04 KB
Contents
require 'spec_helper' describe Jsus::Util::Validator::Base do subject { described_class.new(pool) } let(:input_dir) { "spec/data/ChainDependencies/app/javascripts" } let!(:pool) { Jsus::Pool.new(input_dir) } context "initialization" do it "should accept pool as the first argument" do described_class.new(pool).source_files.should =~ pool.sources.to_a end it "should accept container as the first argument" do described_class.new(pool.sources).source_files.should =~ pool.sources.to_a end it "should accept array as the first argument" do described_class.new(pool.sources.to_a).source_files.should =~ pool.sources.to_a end end it "should respond to #validate method" do subject.should respond_to(:validate) end describe ".validate" do it "should be the same as calling new + validate" do validator = mock described_class.should_receive(:new).with([1]).and_return(validator) validator.should_receive(:validate).and_return(true) described_class.validate([1]) end end end
Version data entries
9 entries across 9 versions & 1 rubygems