Sha256: 10c0f87c49f1b279c34c56defe005629c678a139af15f8d4d7594afb396491b7
Contents?: true
Size: 1.15 KB
Versions: 4
Compression:
Stored size: 1.15 KB
Contents
require 'spec_helper' describe "Daigaku module" do describe "::config" do subject { Daigaku.config } [:config, :configure, :start].each do |method| it "responds to ::#{method}" do expect(Daigaku.singleton_methods).to include method end end it "returns Configuration of class Daigaku::Configuration" do expect(subject).to be_an_instance_of Daigaku::Configuration end it "returns a singleton setting" do expect(subject).to be Daigaku.config end end describe "::configure" do let(:configure) do proc do Daigaku.configure do |config| config.solutions_path = test_basepath end end end it "allows to configure the app" do expect { configure.call }.not_to raise_error end it "sets configutation properties" do configure.call expect(Daigaku.config.solutions_path).to eq test_basepath end it "allows to change the config during runtime" do Daigaku.configure do |config| config.solutions_path = courses_basepath end expect(Daigaku.config.solutions_path).to eq courses_basepath end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
daigaku-0.3.0 | spec/daigaku_spec.rb |
daigaku-0.2.0 | spec/daigaku_spec.rb |
daigaku-0.1.1 | spec/daigaku_spec.rb |
daigaku-0.1.0 | spec/daigaku_spec.rb |