-
-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
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_foo or myProject.foo
myProject.foo = "bar"
expect( myProject:returnFoo() ).to.equal( "bar" )
end,
cleanup = function( state )
myProject.foo = state.original_foo
end
}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
}Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers