Sha256: c1de485cbd9ce395b03d5a7d028a18bc87b5c89e4d3c19526b9e19830d1bafc6

Contents?: true

Size: 625 Bytes

Versions: 13

Compression:

Stored size: 625 Bytes

Contents

require "test_helper"
require "vanity/commands/report"

describe Vanity::Commands do
  before do
    metric "Coolness"
  end

  describe ".report" do
    describe "given file" do
      let(:file) { "tmp/config/redis.yml" }

      it "writes to that file" do
        new_ab_test :foobar do
          alternatives "foo", "bar"
          identify { "me" }
          metrics :coolness
          default "foo"
        end
        experiment(:foobar).choose

        FileUtils.mkpath "tmp/config"
        Vanity::Commands.report(file)
      end

      after do
        File.unlink(File.open(file, "w"))
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
vanity-2.2.10 test/commands/report_test.rb
vanity-2.2.9 test/commands/report_test.rb
vanity-2.2.8 test/commands/report_test.rb
vanity-2.2.7 test/commands/report_test.rb
vanity-2.2.6 test/commands/report_test.rb
vanity-2.2.4 test/commands/report_test.rb
vanity-2.2.3 test/commands/report_test.rb
vanity-2.2.2 test/commands/report_test.rb
vanity-2.2.1 test/commands/report_test.rb
vanity-2.2.0 test/commands/report_test.rb
vanity-2.1.2 test/commands/report_test.rb
vanity-2.1.1 test/commands/report_test.rb
vanity-2.1.0 test/commands/report_test.rb