Sha256: 4974d20dffe6cf4151b4fcd8e9f5664745e33f2ce463e803051981d4f0e41ff2

Contents?: true

Size: 1.91 KB

Versions: 6

Compression:

Stored size: 1.91 KB

Contents

describe "Cure" do
  describe ".peace" do
    describe "#pikarin_janken" do
      subject{ girl.pikarin_janken }

      shared_examples :do_janken do
        it{ should match %r/ピカピカピカリン\nジャンケンポン!\n(.+)/ }
      end

      context "When peace" do
        let(:girl){ Cure.peace }
        it_behaves_like :do_janken
      end

      context "When cure_peace" do
        let(:girl){ Cure.cure_peace }
        it_behaves_like :do_janken
      end
    end
  end

  describe ".passion" do
    describe "!" do
      subject{ !Cure.passion }

      let(:girl){ Cure.passion }

      after do
        girl.rollback
        girl.humanize!
      end

      context "called once" do
        it{ expect{ subject }.to change{ girl.name }.from("東せつな").to("イース") }
      end

      context "called twice" do
        before do
          !Cure.passion
        end

        it{ expect{ subject }.to change{ girl.name }.from("イース").to("東せつな") }
      end

      context "after transform" do
        before do
          girl.transform!
        end

        it{ expect{ subject }.to change{ girl.name }.from("キュアパッション").to("イース") }
      end
    end
  end

  describe ".beat" do
    describe "!" do
      subject{ !Cure.beat }

      let(:girl){ Cure.beat }

      after do
        girl.rollback
        girl.humanize!
      end

      context "called once" do
        it{ expect{ subject }.to change{ girl.name }.from("黒川エレン").to("セイレーン") }
      end

      context "called twice" do
        before do
          !Cure.beat
        end

        it{ expect{ subject }.to change{ girl.name }.from("セイレーン").to("黒川エレン") }
      end

      context "after transform" do
        before do
          girl.transform!
        end

        it{ expect{ subject }.to change{ girl.name }.from("キュアビート").to("セイレーン") }
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rubicure-0.2.4 spec/cure_spec.rb
rubicure-0.2.3 spec/cure_spec.rb
rubicure-0.2.2.1 spec/cure_spec.rb
rubicure-0.2.2 spec/cure_spec.rb
rubicure-0.2.1 spec/cure_spec.rb
rubicure-0.2.0 spec/cure_spec.rb