Sha256: cb1f584a8354d9ce88c89f837b1f3c8ec3c78b3a2d88bd024e410254a0a6b741

Contents?: true

Size: 601 Bytes

Versions: 6

Compression:

Stored size: 601 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
        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

6 entries across 6 versions & 1 rubygems

Version Path
vanity-2.0.1 test/commands/report_test.rb
vanity-2.0.0 test/commands/report_test.rb
vanity-2.0.0.beta9 test/commands/report_test.rb
vanity-2.0.0.beta8 test/commands/report_test.rb
vanity-2.0.0.beta7 test/commands/report_test.rb
vanity-2.0.0.beta6 test/commands/report_test.rb