You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes you want to stub non-function values, like convars, strings, etc. from tables. Right now, you'd have to manually keep track of and clean up the changes:
{
name="Example"func=function( state )
state.original_foo=state.original_fooormyProject.foomyProject.foo="bar"expect( myProject:returnFoo() ).to.equal( "bar" )
end,
cleanup=function( state )
myProject.foo=state.original_fooend
}
It would be nice if we could do:
{
name="Example"func=function( state )
stub( myProject, "foo" ).with( "bar" )
expect( myProject:returnFoo() ).to.equal( "bar" )
end
}
The text was updated successfully, but these errors were encountered:
Sometimes you want to stub non-function values, like convars, strings, etc. from tables. Right now, you'd have to manually keep track of and clean up the changes:
It would be nice if we could do:
The text was updated successfully, but these errors were encountered: