<commit_before>require 'spec_helper'
require 'tempfile'

describe Guard::Migrate do
  let(:options){ {}}
  let(:paths){{}}

  subject{ Guard::Migrate.new(paths, options) }

  before(:all) do
    FileUtils.mkdir_p('db/migrate')
  end

  after(:all) do
    FileUtils.rm_rf('db')
  end

  describe "options" do
    context "bundler" do
      context "with a gemfile found" do
        before{File.stub!(:exist?).and_return(true) }
        its(:bundler?){should be_true}
        its(:rake_string){should match(/^bundle exec rake/)}

        context "with bunder set to false" do
          let(:options){ { :bundler => false }}

          its(:bundler?){should be_false}
          its(:rake_string){should match(/^rake/)}
        end
      end
      context "with no gemfile found" do
        before{File.stub!(:exist?).and_return(false)}<commit_msg>replace stub! with stub<commit_after>require 'spec_helper'
require 'tempfile'

describe Guard::Migrate do
  let(:options){ {}}
  let(:paths){{}}

  subject{ Guard::Migrate.new(paths, options) }

  before(:all) do
    FileUtils.mkdir_p('db/migrate')
  end

  after(:all) do
    FileUtils.rm_rf('db')
  end

  describe "options" do
    context "bundler" do
      context "with a gemfile found" do
        before{File.stub(:exist?).and_return(true) }
        its(:bundler?){should be_true}
        its(:rake_string){should match(/^bundle exec rake/)}

        context "with bunder set to false" do
          let(:options){ { :bundler => false }}

          its(:bundler?){should be_false}
          its(:rake_string){should match(/^rake/)}
        end
      end
      context "with no gemfile found" do
        before{File.stub(:exist?).and_return(false)}
{'fraction_non_alphanumeric': 0.14327830188679244, 'fraction_numerical': 0.0, 'mean_word_length': 3.0023584905660377, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4793012', 'n_tokens_mistral': 561, 'n_tokens_neox': 546, 'n_words': 126}