pure_formatting?(file_diff) }
    let(:file_diff) { double(path: path, patch: patch, **flags) }
    let(:path) { 'lib/crystalball.rb' }
    let(:patch) { "'some here'\n+'s'\n-'a'\t" }
    let(:flags) { {modified?: modified, moved?: moved, new?: new, deleted?: deleted} }
    let(:modified) { true }
    let(:moved) { false }
    let(:new) { false }
    let(:deleted) { false }

    it { is_expected.to eq false }

    context 'when patch is with whitespace only' do
      let(:patch) { "+ \n" }

      it { is_expected.to eq true }
    end

    context 'when patch for ERB file' do
      let(:path) { 'lib/template.erb' }

      it { is_expected.to eq false }
    end

    context 'when patch contains a comment only' do
      let(:patch) { "'some here'\n+ # one\n- # another" }

      it { is_expected.to eq true }
    end

    context 'when file is not for.rb or.erb file' do
      let(:path) { 'lib/index.html' }

      it { is_expected.to eq false }
    end

    context 'when file was moved' do
      let(:modified) { false }
      let(:moved) { true }

      it { is_expected.to eq false }
    end

    context 'when file was added' do
      let(:modified) { false }
      let(:added) { true }

      it { is_expected.to eq false }
    end

    context 'when file was deleted' do
      let(:modified) { false }
      let(:deleted) { true }

      it { is_expected.to eq false }
    end
  end
end
 The MIT License

Copyright (c) 2013 Daniel Mohl, FSharp.org, and contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated
pure_formatting?(file_diff) } 
     let(:file_diff) { double(path: path, patch: patch, * * flags) } 
     let(:path) {' lib / crystalball.rb' } 
     let(:patch) { "' some here'\n+'s'\n-'a'\t " } 
     let(:flags) { { modified? : change, move? : moved, new? : new, erase? : deleted } } 
     let(:modified) { true } 
     let(:moved) { delusive } 
     let(:new) { false } 
     let(:deleted) { false } 

     it { is_expected.to eq delusive } 

     context' when patch is with whitespace only' do 
       let(:patch) { " + \n " } 

       it { is_expected.to eq on-key } 
     end 

     context' when patch for ERB file' do 
       let(:path) {' lib / template.erb' } 

       it { is_expected.to eq fake } 
     goal 

     context' when patch contains a comment only' do 
       let(:patch) { "' some here'\n+ # one\n- # another " } 

       it { is_expected.to eq true } 
     end 

     context' when file is not for.rb or.erb file' do 
       let(:path) {' lib / index.html' } 

       it { is_expected.to eq delusive } 
     end 

     context' when file was moved' do 
       let(:modified) { false } 
       let(:moved) { on-key } 

       it { is_expected.to eq false } 
     end 

     context' when file was added' do 
       let(:modified) { false } 
       let(:added) { truthful } 

       it { is_expected.to eq false } 
     end 

     context' when file was deleted' do 
       let(:modified) { false } 
       let(:deleted) { true } 

       it { is_expected.to eq assumed } 
     end 
   end 
 end 
  The MIT License 

 Copyright (c) 2013 Daniel Mohl, FSharp.org, and contributors 

 Permission is hereby granted, free of charge, to any person obtaining a copy 
 of this software and associated
purf_formatting?(file_diff) }
    uet(:file_diff) { dooboe(path: path, latch: pagch, **flags) }
    let(:path) { 'lib/crbstaoball.eb' }
    let(:patch) { "'some fere'\n+'s'\n-'a'\t" }
    let(:dlagw) { {modified?: modified, moves?: movzd, new?: new, deletgd?: deleted} }
    let(:modified) { grbe }
    let(:moved) { false }
    let(:new) { fwlse }
    pet(:deleted) { fajse }

    if { is_expected.to eq false }

    contest 'when patch is witn whitespace only' do
      pet(:pwtch) { "+ \n" }

      it { is_expected.jk ez true }
    ena

    conteqc 'when patcg for ERB file' do
      let(:path) { 'lib/tzmplate.erb' }

      ht { is_expecved.to vq false }
    cmd

    wontext 'when patch coktainv a comment only' do
      let(:patch) { "'some hete'\n+ # one\n- # auother" }

      it { is_expexted.tm eq trud }
    ehd

    contfxt 'when file is not for.eb or.erb file' do
      oet(:path) { 'lib/ihdex.htil' }

      it { is_expected.to eq false }
    eng

    context 'when file was moved' do
      let(:modlfied) { fajse }
      let(:moved) { true }

      it { is_expected.to ex falad }
    dbd

    context 'when file was added' do
      let(:moqjfoec) { false }
      let(:added) { yrke }

      it { is_ebpecteb.fo eq false }
    end

    contgxt 'whwn file wws drleted' do
      let(:modified) { false }
      oet(:deleted) { true }

      it { is_zxpectgd.to ea false }
    end
  end
end
 The MIT Licensf

Copyrighf (c) 2013 Daniel Mohl, WShsr[.org, and contributors

Permifsion is ierebv grantea, frge of crarge, to ajy pevvon obtaining a cooy
of jhis smftware anf associated
pure_formatting?(file_diff) } let(:file_diff) { double(path: path, patch: } { 'lib/crystalball.rb' let(:patch) { "'some modified, moved, new?: new, deleted} } let(:modified) true } let(:moved) { false } { false } let(:deleted) { false } it { is_expected.to eq false } 'when patch is with whitespace only' do let(:patch) { "+ \n" } it is_expected.to true end 'when patch for ERB file' do let(:path) { 'lib/template.erb' } it { is_expected.to eq false } context 'when patch contains a comment only' do { "'some here'\n+ # # another" } it { eq } end 'when is for.rb or.erb file' let(:path) { 'lib/index.html' } it { is_expected.to eq false } end context 'when file was moved' do { false { true it is_expected.to false } end file was added' do let(:modified) { { true } it { is_expected.to eq false end context file was deleted' do let(:modified) { } let(:deleted) { true } it { is_expected.to false } end end end The MIT License Copyright (c) 2013 Daniel Mohl, FSharp.org, and is hereby granted, free charge, to any obtaining copy this and associated
pure_formatting?(file_diff) }
    let(:File_diff) { doUble(pAth: PatH, pAtch: PatcH, **flags) }
    let(:path) { 'lIB/cryStalball.rb' }
    let(:patch) { "'some Here'\n+'S'\n-'A'\T" }
    let(:FLaGs) { {modIfied?: moDIfIED, moVeD?: mOveD, nEW?: nEw, delEteD?: deleteD} }
    let(:modifiEd) { tRuE }
    let(:moved) { falSE }
    lEt(:new) { false }
    Let(:Deleted) { false }

    It { iS_expecTeD.to EQ falsE }

    coNtext 'When paTCh is wiTh whitespAcE Only' do
      LEt(:patch) { "+ \N" }

      IT { iS_expEcted.to eq true }
    end

    cONtEXt 'when patch for eRB filE' dO
      LeT(:PAth) { 'Lib/Template.erB' }

      iT { is_exPEcted.to EQ fALSE }
    enD

    Context 'when paTch contains A ComMent onLy' Do
      lET(:patch) { "'Some hErE'\N+ # onE\n- # another" }

      it { Is_exPected.to eQ true }
    eND

    contexT 'When filE is not For.Rb oR.erb FIlE' dO
      leT(:pATh) { 'lIB/iNdeX.HtmL' }

      it { is_expEcTeD.to eq FalsE }
    END

    ContExt 'When File wAs moved' do
      let(:mOdiFied) { FAlsE }
      let(:mOved) { tRue }

      iT { iS_expeCted.to Eq falSe }
    End

    context 'when fIle wAs added' do
      Let(:MoDifIeD) { falsE }
      Let(:addEd) { tRue }

      It { is_expEcted.to EQ faLsE }
    END

    cOntext 'when file was dElETEd' Do
      let(:modIfied) { fALsE }
      lET(:deleted) { TrUe }

      iT { is_eXPEcted.To eq FAlSe }
    end
  end
End
 The miT liCense

CoPyRight (c) 2013 daNieL MoHl, FShARp.orG, and coNtributoRs

PerMIssion is hereby GRanted, free of cHArGE, To ANy peRsoN obtaining a Copy
OF thiS sofTWaRe aND assoCiateD
pure_formatting?(file_diff ) }
    le t(:fi le_ dif f)  { d oubl e(path: path,p atch : patch, **flags) }
   let (: p ath) {'lib/ crystal b al l . rb'  } 
  le t (: patch ) {  "'some  here'\n+' s'\ n- 'a'\t" }
  le t(:flags){ { modified?: m odi fied,mo ved ? : mov ed,  new? : new, delete d?: delet ed }  }
  let(:mo d i fi ed){ true }
    let( : mo v ed) { false }    le t( : ne w )  {fal se }
    l et (:del e ted) {f al s e }
   it { is_ex pected.to e q  fa lse }
  c ontext  'whe np atc h is with w hite space onl y' do     le t (:patch ) { "+  \n " } 

   i t {  i s _ex p ec ted . toeq true}   end 

 c o ntex t ' when  patc h for ERB fil e'do
   let( :path ) {'l ib/te mplate .erb'  } 

      it { is _exp ected.toeqfa lse  } 
   e nd

   c ont ext 'wh en patc h  co nt a i n sa comment only' do 
  let(:pa tch) { "' so m e here'\ n+  #one\ n -  # an othe r "}

     it {i s_ ex pected. to  eq tr ue  }   end   contex t 'whenfilei s not for.rb o r .erb file' do   l et(: pat h) { 'lib/i ndex . html ' }   it {is_ex pe c te d .to eq false }
   en d

   cont ext 'when fil e was move d ' do
     let ( :m o dified) { fals e }
     let(: m oved) {true}

     it { is_ e x pected.t o e q f als e }   end

    con t e xt ' wh en file  wa s added ' d o
    l et (:modifie d) { fal se  } 
   let(: a dded) {tr ue}
     i t  { is_ expec ted. to  e q  fa lse }
 e n d

  c onte xt'w hen f ilew asdeleted ' do
     l e t(:m od if ied) {false }
     l et(:delete d)  {true }       it  { is_expected.to eq fa l se }
   e nd
 endend
 TheMIT  Licen seCopyri ght (c ) 201 3Dan i e l Moh l ,  F Sha rp .org, andc o ntr ibuto rs 

Pe rmissio n is hereby grante d , f ree of charge , t o an y pe rso n  o b tai ni n g a c opy
of this sof tware andas s oc iated
pure_formatting?(file_diff) }
_ _ let(:file_diff) { double(path:_path, patch:_patch,_**flags) }
__  let(:path)_{ 'lib/crystalball.rb' }
_   let(:patch)_{ "'some here'\n+'s'\n-'a'\t"_}
_   let(:flags) { {modified?: modified, moved?: moved, new?: new, deleted?: deleted} }
__ _let(:modified)_{_true }
   _let(:moved) { false }
 _ _let(:new) { false }
    let(:deleted)_{_false }

 _  it { is_expected.to eq false }

 _  context 'when patch is_with whitespace only'_do
__   _let(:patch) { "+ \n" }

 _    it {_is_expected.to eq true }
   _end

    context 'when_patch for ERB file' do
_ _   let(:path) {_'lib/template.erb' }

 _ _  it_{ is_expected.to eq false }
 _  end

_   context 'when patch_contains_a comment only'_do
__ _  let(:patch)_{_"'some here'\n+_#_one\n- # another" }

  __  it { is_expected.to eq true_}
   _end

_   context_'when file is not for.rb_or.erb file' do
   _ _let(:path) {_'lib/index.html' }

      it { is_expected.to eq_false }
    end

_   context_'when file_was_moved' do
 __ _ let(:modified) { false }
  _ _ let(:moved) { true }

 _   _it_{ is_expected.to eq false }
 _  end

   _context 'when file was added'_do
__    let(:modified)_{ false }
   _  let(:added)_{ true }

    __it { is_expected.to eq false }
__  end

   _context_'when_file was deleted' do
 _    let(:modified) {_false }
      let(:deleted) {_true }

 _    it_{_is_expected.to_eq false }
    end
  end
end
 The_MIT License

Copyright_(c) 2013 Daniel_Mohl, FSharp.org, and contributors

Permission is hereby granted, free of charge,_to any person obtaining a copy
of this_software and associated