Sha256: 7e9c3146796988e85229c9309d51da82f39ca8b2cd801da420a3dc94f36609a6

Contents?: true

Size: 822 Bytes

Versions: 4

Compression:

Stored size: 822 Bytes

Contents

require 'test_helper'

class ApotomoTest < MiniTest::Spec
  describe "The main module ::Apotomo" do
    describe "when setting #js_framework" do
      before do
        Apotomo.js_framework = :jquery
      end

      it "respond to #js_framework and return javascript framework's name" do
        assert_equal :jquery, Apotomo.js_framework
      end

      it "respond to #js_generator and return an correct instance" do
        assert_kind_of Apotomo::JavascriptGenerator, Apotomo.js_generator
        assert_kind_of Apotomo::JavascriptGenerator::Jquery, Apotomo.js_generator
      end
    end

    it "respond to #setup" do
      Apotomo.setup do |config|
        config.js_framework = :jquery
      end

      # TODO: Apotomo expect #js_framework
      assert_respond_to Apotomo.js_generator, :jquery
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
apotomo-1.3.2 test/apotomo_test.rb
apotomo-1.3.1 test/apotomo_test.rb
apotomo-1.3.0 test/apotomo_test.rb
apotomo-1.2.6 test/apotomo_test.rb