summaryrefslogtreecommitdiffstats
path: root/spec/unit/parser/ast/nop.rb
blob: 5a71325861e8bc36d1ca01b923dbeaf21f4c5318 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env ruby

require File.dirname(__FILE__) + '/../../../spec_helper'

describe Puppet::Parser::AST::Nop do

    before do
        @scope = mock 'scope'
    end

    it "should do nothing on evaluation" do
        Puppet::Parser::AST.expects(:safeevaluate).never
        Puppet::Parser::AST::Nop.new({}).evaluate(@scope)
    end

    it "should not return anything" do
        Puppet::Parser::AST::Nop.new({}).evaluate(@scope).should be_nil
    end

end