Sha256: 8e289be82a94e28f2459b239fea6bf6128ea5c4a0101633c75b6d69d5964ed6b

Contents?: true

Size: 1.47 KB

Versions: 2

Compression:

Stored size: 1.47 KB

Contents

module Enginery
  module Test
    module DeleteSpec
      Spec.new self do

        Dir.chdir DST_ROOT do

          is(new_app 'App').ok?

          Dir.chdir 'App' do

            entries = [
              'base/specs/foo/bar' + Enginery::SPEC_SUFFIX
            ]
            Should 'be deleted alongside controller' do
              is(new_controller 'Foo').ok?
              is(new_route 'Foo bar').ok?
              entries.each do |e|
                does(File).exists? e
              end

              is(delete_controller 'Foo').ok?
              entries.each do |e|
                refute(File).exists? e
              end
            end
            Should 'be deleted alongside route' do
              is(new_controller 'Foo').ok?
              is(new_route 'Foo bar').ok?
              entries.each do |e|
                does(File).exists? e
              end

              is(delete_route 'Foo bar').ok?
              entries.each do |e|
                refute(File).exists? e
              end
            end
            Should 'be deleted manually' do
              delete_controller 'Foo'
              is(new_controller 'Foo').ok?
              is(new_route 'Foo bar').ok?
              entries.each do |e|
                does(File).exists? e
              end

              is(delete_spec 'Foo bar').ok?
              entries.each do |e|
                refute(File).exists? e
              end
            end
          
          end
        end

      end
    end
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
my_enginery-0.2.8 test/delete/test__spec.rb
enginery-0.3.0 test/delete/test__spec.rb